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 in c
Posted by Abdulmuqsit 9 Aug 2011 13:17
#include <stdio.h>
#include <stdlib.h>
#include <math.h>

int main()
{
    long long buffer;
    long result[131072];
    int count = 0;
    int i;
    while( scanf( "%lld",&buffer ) != EOF )
        result[count++]= buffer;

    for( i = count-1; i >= 0; i-- )
        printf("%.4f\n",sqrt(result[i]));
    return (0);
}


Please help solve the problem
Re: wrong answer in c
Posted by kaikaijia 10 Aug 2011 19:17
sqrt()的参数只能是double。自己改把。不会的话再说,我QQ: 992913926
Re: wrong answer in c
Posted by acm_jtc2011 2 Nov 2011 02:42
hi
choice double type for array
and select printf("\n%.4lf",a[i]);Instead, your code.