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

why WA?
Posted by Asif Mahmud 24 Feb 2013 19:18
#include<stdio.h>
#include<math.h>
unsigned long long int a,i,s[10000000];
int main()
{
    double b;
    i=0;
    //freopen("input.txt","r",stdin);
    while(scanf("%llu",&a)!=EOF)
    {
        s[i]=a;
        i++;


    }
    while(i>0)
    {
        i--;
        b=sqrt(s[i]);
        printf("%.4lf\n",b);
    }

    return 0;
}
Re: why WA?
Posted by Ruki 12 Mar 2013 11:42
Plz use "%.4f" instead "%.4lf" to printf. :)
Re: why WA?
Posted by Prodhan Abdel Rida 17 Mar 2013 08:20
why %.4lf is not acceptable?
Re: why WA?
Posted by jieke1231 27 Nov 2013 15:31
you are fool?  this is no need reason ,this is fixed 格式
Re: why WA?
Posted by [ONPU-13]Asalle 2 Feb 2014 21:06
To use sqrt() from math.h you need to add -lf flag while compiling, I believe.