标签:
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 2810 Accepted Submission(s): 1922
1 #include <stdio.h> 2 #define P 3.1415927 3 #define toFeet(x) x/12.0 4 #define toMiles(x) x/5280.0 5 6 int main(){ 7 double diameter;//直径 8 int revolutions;//转数 9 double time;//时间 10 double s; //距离 11 int count=1; 12 while(scanf("%lf%d%lf",&diameter,&revolutions,&time),revolutions){ 13 time/=3600; 14 diameter/=63360; 15 s=diameter*P*revolutions; 16 printf("Trip #%d: %.2lf %.2lf\n",count++,s,s/time); 17 } 18 }
标签:
原文地址:http://www.cnblogs.com/MICE1024/p/5684299.html