| ||||||||||
| 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 | |||||||||
1045 那位大虾帮我看看哇,这怎么挂的???-.-!!#include<stdio.h>
#include<math.h>
int main()
{
double t,vs,r,c,w,c2,w2,r2,vsr;
int n;
scanf("%lf%lf%lf%d",&vs,&r,&c,&n);
while(n--)
{
scanf("%lf",&w);
vsr=vs*r;
r2=r*r;
c2=c*c;
w2=w*w;
t=vsr/sqrt(r2+1.0/(w2*c2));//这里改成t=vsr/(sqrt(r2+1.0/(w2*c2)))就AC了,囧。。。
printf("%.3f\n",t);
}
return 0;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator