您的位置:首页 > 其它

Sicily 1051. Biker's Trip Odomete Description

2012-02-04 15:55 417 查看
前面的导语有点吓人,但简言之只是单位换算题目 ,并没有什么难度。需要注意 的是 , 除了 各个数据具体的单位外,还有就是时间也是浮点数,否则会 TLE。

Run Time: 0sec

Run Memory: 304KB

Code length: 358Bytes

SubmitTime: 2012-01-31 17:14:35 Code

// Problem#: 1051
// Submission#: 1203282
// The source code is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License
// URI: http://creativecommons.org/licenses/by-nc-sa/3.0/ // All Copyright reserved by Informatic Lab of Sun Yat-sen University
#include <cstdio>
using namespace std;

int main()
{
double r, time, dist;
int n;

for ( int i = 1; true; i++ ) {
scanf( "%lf%d%lf", &r, &n, &time );
if ( n == 0 )
break;
dist = 3.1415927 * r * n / 12 / 5280;
printf( "Trip #%d: %.2lf %.2lf\n", i, dist , dist / time * 60 * 60 );
}

return 0;

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: