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 |
Re:c怎么结束输入啊,Output Limit ExceededIn Reply To:c怎么结束输入啊,Output Limit Exceeded Posted by:l2011012181 at 2013-07-18 16:12:35 > #include <stdio.h> > #include<math.h> > > #define pi 3.1415926 > > int main() > { > float r,h,d1,A1,d2,A2,d,A; > while(scanf("%f%f%f%f%f%f",&r,&h,&d1,&A1,&d2,&A2)) > { > A = A2 - A1; > if(A < 0) > A = -A; > d = sqrt(d1 * d1 + d2 * d2 - 2 * d1 * d2 * cos(A * r / sqrt(r * r + h * h) * pi / 180)); > printf("%.2f\n",d); > } > return 0; > } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator