I solved the problem   https://www.spoj.pl/problems/FTHEELF/

i dont know why i am WA..........plz tell why it getting WA.......if there
are cases where my code fails please specify !!


#include<stdio.h>
#include<math.h>
int main()
{
    int v,h;
    long double t,d,g=9.8L;
    while(1)
    {
        scanf("%d%d",&v,&h);
        if(v==-1&&h==-1)
            return 0;
        else
        {

t=(2*v*(1/sqrtl(2))+sqrtl((4*v*v*(1/sqrtl(2))*(1/sqrtl(2)))+8*h*g))/(2*g);
            d=v*(1/sqrtl(2))*t;
            printf("%.6Lf\n",d);
        }
    }
return 0;
}

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to