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

Wrong Answer C ! Help please!
Posted by Pedro 5 Dec 2014 22:50
#include <stdio.h>
#include <math.h>


int main(){

double num1,num2,num3,num4;


scanf("%lf %lf %lf %lf",&num1,&num2,&num3,&num4);

printf("%.4lf\n%.4lf\n%.4lf\n%.4lf",sqrt(num4),sqrt(num3),sqrt(num2),sqrt(num1));

return 0;
}

why is it  wrong?
Re: Wrong Answer C ! Help please!
Posted by natezhang 6 Dec 2014 21:43
I think it's not necessarily exactly 4 numbers.

Judging from my result, I think there are many numbers in the test case.

So you need a list or something to store the integers first then print the sqrt in reversed order.

(also, the integer is very big, so int type might not work)