hdoj 1037 Biker's trip odometer (巨水)

来源:互联网 发布:知乎 登录过于频繁 编辑:程序博客网 时间:2024/06/08 00:12

思路:翻译数学公式。。。。。

代码如下:

#include <stdio.h>#include <stdlib.h>#include <string.h>/* run this program using the console pauser or add your own getch, system("pause") or input loop */#define  p 3.1415927int main(int argc, char *argv[]) {long long  r;double d,t;int n=1;while(scanf("%lf%lld%lf",&d,&r,&t) && r!=0){printf("Trip #%d: %.2lf %.2lf\n",n,p*d*r/12/5280,(p*d*r/12/5280)/(t/3600));n++;} return 0;}


原创粉丝点击