ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1001. Reverse Root

Got wrong answer any pointers?
Posted by Stefan Jacobs 4 Feb 2011 11:11
  1 #include<stdio.h>
  2 #include<math.h>
  3 int main(void)
  4 {
  5         unsigned long long num;
  6         int counter = 0,i;
  7         unsigned long long list[16384];
  8         int ret;
  9         while(!feof(stdin))
 10         {
 11                 ret = scanf("%Ld", &num);
 12                 if(ret == EOF)
 13                         break;
 14                 else
 15                 {
 16                         list[counter] = num;
 17                         counter++;
 18                 }
 19         }
 20         for(i=(counter-1);i>=0;i--)
 21                 printf(" %.4f\n", sqrt(list[i]));
 22         return 0;
 23 }
 24