ZOJ 1813 Biker's Trip Odometer

FLUENT UDF编译及蒸发冷凝相关问题 蒸发冷凝与相间传质 阅读详情
Biker's Trip Odometer

Time Limit: 2 Seconds      Memory Limit: 65536 KB

Most bicycle speedometers work by using a Hall Effect sensor fastened to the front fork of the bicycle. A magnet is attached to one of the spokes on the front wheel so that it will line up with the Hall Effect switch once per revolution of the wheel. The speedometer monitors the sensor to count wheel revolutions. If the diameter of the wheel is known, the distance traveled can be easily be calculated if you know how many revolutions the wheel has made. In addition, if the time it takes to complete the revolutions is known, the average speed can also be calculated.

For this problem, you will write a program to determine the total distance traveled (in miles) and the average speed (in Miles Per Hour) given the wheel diameter, the number of revolutions and the total time of the trip. You can assume that the front wheel never leaves the ground, and there is no slipping or skidding.


Input

Input consists of multiple datasets, one per line, of the form:

diameter revolutions time

The diameter is expressed in inches as a floating point value. The revolutions is an integer value. The time is expressed in seconds as a floating point value. Input ends when the value of revolutions is 0 (zero).


Output

For each data set, print:

Trip #N: distance MPH

Of course N should be replaced by the data set number, distance by the total distance in miles (accurate to 2 decimal places) and MPH by the speed in miles per hour (accurate to 2 decimal places). Your program should not generate any output for the ending case when revolutions is 0.

Constants

For p use the value: 3.1415927.
There are 5280 feet in a mile.
There are 12 inches in a foot.
There are 60 minutes in an hour.
There are 60 seconds in a minute.
There are 201.168 meters in a furlong.


Sample Input

26 1000 5
27.25 873234 3000
26 0 1000


Sample Output

Trip #1: 1.29 928.20
Trip #2: 1179.86 1415.84

题意:计算自行车行驶的距离和平均速度

代码:

#include <stdio.h>
#define Pi 3.1415927


int main()
{
    float d;
    int c;
    float s;
    int i=0;
    while(scanf("%f%d%f",&d,&c,&s))
    {
        float mile,MPH;
        if(c==0)
            break;
        i++;
        mile=Pi*d*c/(12*5280);
        MPH=mile/(1.0*s/3600);
        printf("Trip #%d: %.2f %.2f\n",i,mile,MPH);
    }
    return 0;
}


20、七鳃鳗繁殖与早期生活史:从水质到养殖的全面解析 本文全面解析了七鳃鳗的繁殖与早期生活史,重点探讨了水质对幼体生存的影响、养殖密度与生长关系、变态过程的时间与大小特征,以及人工繁殖在濒危物种恢复和入侵物种控制中的应用。同时,文章分析了大规模养殖面临的挖掘基质需求、空间限制、清洁管理、疾病防控及微生物环境等挑战,并强调实验室养殖对科学研究和种群管理的重要意义。随着技术进步,未来有望扩展更多物种的繁殖研究,揭示七鳃鳗生物学的进化奥秘,实现资源的可持续利用。 阅读详情

相关推荐

【全球人口数据集】全球人口密度数据集GPWv4

全球人口密度数据集GPWv4

WW、forever的博客 974

HDU 1038 Biker's Trip Odometer

Biker's Trip Odometer Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 2300    Accepted Submission(s): 1556 Problem Description Most

胖子加油! 962

37、基于视觉的轻量级面部呼吸和心率测量技术

本文提出了一种基于视觉的轻量级面部呼吸和心率测量技术,通过远程光电容积脉搏波描记法(RPPG)和面部振动信息实现非接触式生理信号采集。创新性地结合框选和特征点选择多个感兴趣区域(ROI),并采用光流跟踪、主成分分析(PCA)和集成经验模态分解(EEMD)等方法优化信号处理流程。实验结果表明,该方法在测量精度和稳定性方面优于传统方法,并可在树莓派4等低功耗平台上实现实时运行,具有广泛的应用前景。

r7s8t的博客 285

zoj1813--------------Biker's Trip Odometer

Most bicycle speedometers work by using a Hall Effect sensor fastened to the front fork of the bicycle. A magnet is attached to one of the spokes on the front wheel so that it will line up with the

Life is Float. 903

ZOJ Problem Set–1813 Biker's Trip Odometer

Time Limit: 2 Seconds Memory Limit: 65536 KB Most bicycle speedometers work by using a Hall Effect sensor fastened to the front fork of the bicycle. A magnet is attached to one of the spoke...

dcl67283的博客 171

zoj 1813 Biker's Trip Odometer

#include "stdio.h" #define pi 3.1415927 int main() { float dia,r,t,dis,mph; int count=0; while(scanf("%f%f%f",&dia,&r,&t)&&r!=0) { dis=dia*pi*r/12/5280;

yzl_rex 846

POJ1665 HDU1038 ZOJ1813 UVALive2865 Biker's Trip Odometer【水题】

Biker's Trip OdometerTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 5740 Accepted: 3610DescriptionMost bicycle speedometers work by using a Hall Effect sensor fastened to the front fork of ...

海岛Blog 596

ZOJ 2172 Symmetric Order

Symmetric Order Time Limit: 2 Seconds      Memory Limit: 65536 KB In your job at Albatross Circus Management (yes, it's run by a bunch of clowns), you have just finished writing a program whose

胖子加油! 1743

ZOJ 1113 u Calculate e

u Calculate e Time Limit: 2 Seconds      Memory Limit: 65536 KB Background A simple mathematical formula for e is where n is allowed to go to infinity. This can actually yield very acc

胖子加油! 1300

ZOJ 1001 A + B Problem

A + B Problem Time Limit: 2 Seconds      Memory Limit: 65536 KB Calculate a + b Input The input will consist of a series of pairs of integers a and b,separated by a space, one pair of inte

胖子加油! 1211

ZOJ 1073 Round and Round We Go

Round and Round We Go Time Limit: 2 Seconds      Memory Limit: 65536 KB Problem A cyclic number is an integer n digits in length which, when multiplied by any integer from 1 to n, yields a ��

胖子加油! 1128

ZOJ 1382 A Simple Task

A Simple Task Time Limit: 2 Seconds      Memory Limit: 65536 KB Given a positive integer n and the odd integer o and the nonnegative integer p such that n = o2^p. Example For n = 24, o = 3

胖子加油! 793

ZOJ 1110 Dick and Jane

Dick and Jane Time Limit: 2 Seconds      Memory Limit: 65536 KB Dick is 12 years old. When we say this, we mean that it is at least twelve and not yet thirteen years since Dick was born. Dick a

胖子加油! 734

ZOJ 2108 Elevator

Elevator Time Limit: 2 Seconds      Memory Limit: 65536 KB The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which

胖子加油! 659

ZOJ 1871 Steps

Steps Time Limit: 2 Seconds      Memory Limit: 65536 KB One steps through integer points of the straight line. The length of a step must be nonnegative and can be by one bigger than, equal to, o

胖子加油! 654

ZOJ 1334 Basically Speaking

Basically Speaking Time Limit: 2 Seconds      Memory Limit: 65536 KB The Really Neato Calculator Company, Inc. has recently hired your team to help design their Super Neato Model I calculator. A

胖子加油! 653

ZOJ 1889 Ones

Ones Time Limit: 2 Seconds      Memory Limit: 65536 KB Given any integer 0 <= n <= 10000 not divisible by 2 or 5, some multiple of n is a number which in decimal notation is a sequence of 1's. H

胖子加油! 650

ZOJ 1394 Polar Explorer

Polar Explorer Time Limit: 2 Seconds      Memory Limit: 65536 KB Introduction You are a intrepid 2-dimensional explorer located at the northern polar reaches of a distant 2-dimensional planet

胖子加油! 634

ZOJ 2186 Keep on Truckin'

Keep on Truckin' Time Limit: 2 Seconds      Memory Limit: 65536 KB Boudreaux and Thibodeaux are on the road again . . . "Boudreaux, we have to get this shipment of mudbugs to Baton Rouge by ton

胖子加油! 614

SVNDrv.sys

详见博客: https://blog.csdn.net/sinat_36710456/article/details/108280312操作系统:windows10说明:华为secoclient由于签名问题连接不上,SVN Adapter V1.0驱动标黄色感叹号。禁用驱动程序强制签名 也可以解决此问题,但一次性禁用的方式太麻烦,永久性禁用要修改BIOS(新版的命令提示符),也很繁琐且不安全。直接替换驱动文件的方式可以一劳永逸的解决此问题。

2021年国赛A题(FAST主动反射面形状调节)论文+代码材料.zip

内含2021年数学建模国赛A题(FAST主动反射面形状调节)论文支撑材料(代码、数据等)供学习参考或交期末作业等

上一篇: ZOJ 1797 Least Common Multiple
下一篇: ZOJ 1871 Steps
wpfengqi
博客等级 码龄14年 6粉丝 121原创
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值