| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
请教请问大牛这个程序哪里错了,Sample 过了,但一直WA。好郁闷。
#include<stdio.h>
#include<math.h>
#define PI 3.14
int main()
{
double s,v,h,r,h2,l;
while(scanf("%lf",&s)!=EOF)
{
h=sqrt(2*s/PI);
l=PI*PI*h2+2*PI*s;
r=sqrt(s*s/l);
v=PI*r*r*h/3;
printf("%.2f\n%.2f\n%.2f\n",v,h,r);
}
return 0;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator