POJ 1665
#include<iostream>//chengdacaizi 08.11.12
#include<iomanip>
#define p 3.1415927
using namespace std;
int main()
{
int num=;
double getdistance(double , int );
double getspeed(double , double );
double diameter;
int revolutions;
double time;
double distance;
double speed;
while(){
cin>>diameter>>revolutions>>time;
if(revolutions==)
break;
distance = getdistance(diameter,revolutions);
speed = getspeed(distance,time);
cout<<"Trip #"<<num<<": "<<setiosflags(ios::fixed)<<setprecision()<<distance<<" "<<speed<<endl;
num++;
}
return ;
}
double getdistance(double diameter,int revolution)
{
diameter/=;
diameter*=p;
diameter*=revolution;
return diameter;
}
double getspeed(double distance, double time)
{
return distance/time*;
}
关注我的公众号,当然,如果你对Java, Scala, Python等技术经验,以及编程日记,感兴趣的话。

技术网站地址: vmfor.com
POJ 1665的更多相关文章
- POJ 2284 That Nice Euler Circuit (LA 3263 HDU 1665)
http://poj.org/problem?id=2284 https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&a ...
- poj 题目分类(1)
poj 题目分类 按照ac的代码长度分类(主要参考最短代码和自己写的代码) 短代码:0.01K--0.50K:中短代码:0.51K--1.00K:中等代码量:1.01K--2.00K:长代码:2.01 ...
- POJ题目分类(按初级\中级\高级等分类,有助于大家根据个人情况学习)
本文来自:http://www.cppblog.com/snowshine09/archive/2011/08/02/152272.spx 多版本的POJ分类 流传最广的一种分类: 初期: 一.基本算 ...
- POJ题目细究
acm之pku题目分类 对ACM有兴趣的同学们可以看看 DP: 1011 NTA 简单题 1013 Great Equipment 简单题 102 ...
- 转载:poj题目分类(侵删)
转载:from: POJ:http://blog.csdn.net/qq_28236309/article/details/47818407 按照ac的代码长度分类(主要参考最短代码和自己写的代码) ...
- POJ 3370. Halloween treats 抽屉原理 / 鸽巢原理
Halloween treats Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 7644 Accepted: 2798 ...
- POJ 2356. Find a multiple 抽屉原理 / 鸽巢原理
Find a multiple Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 7192 Accepted: 3138 ...
- POJ 2965. The Pilots Brothers' refrigerator 枚举or爆搜or分治
The Pilots Brothers' refrigerator Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 22286 ...
- POJ 1753. Flip Game 枚举or爆搜+位压缩,或者高斯消元法
Flip Game Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 37427 Accepted: 16288 Descr ...
随机推荐
- 【转】Oracle中如何用一条SQL快速生成10万条测试数据
转自http://blog.csdn.net/welken/article/details/4971887 做数据库开发或管理的人经常要创建大量的测试数据,动不动就需要上万条,如果一条一条的录入, ...
- Oracle Database Gateway 安装
在[Oracle HS (Heterogeneous Services)深入解析 及协同Gateway工作流程]一文中主要主要介绍了HS的工作原理,及其如何协同Gateway一起工作.那么了解Gate ...
- listview 优化
ListView的优化: (前两点都是利用ListView的自身优化机制优化[缓存优化]) 1.利用ListView自身的缓存机制,他会缓存条目中的一个条目item,当listview第一屏显示完成之 ...
- hud 2586 How far away ?
题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=2586 How far away ? Description There are n houses in ...
- asp.net实现手机号码归属地查询,代码如下
protected void Button1_Click(object sender, EventArgs e) { if (Regex.IsMatch(TextB ...
- 开启Objective-C --- OC基础知识
一.Objective-C简述 Objective-C通常写作ObjC和较少用的Objective C或Obj-C,是扩充C的面向对象编程语言.Objective-C主要用于:编写iOS操作 ...
- jsapi支付,提示redirect_uri 参数错误
检查授权目录(微信支付——配置中心) appid MCHID KEYS 配置参数是否正确 appsecrect 配置是否正确(开发者中心) 如果是使用测试链接,需要同时指定测试授权目录,测试账号,并且 ...
- 四、VMware Tools 安装 与 问题
解决VMware Tools无法安装的问题 虚拟机上装win2kgho版的系统,安装VMware Tools时,遇到“VMware Tools installation cannot be start ...
- color the python console text
//install termcolor module cd \ cd python27 cd scripts pip install termcolor pip install colorama // ...
- pietty and putty safe password
如何让putty记住密码..pietty也一样的不能记住密码. 找不到好的的方法...只好试着按照参数格式做了一个快捷方式..F:\soft\pietty.exe -pw password123 ro ...