UVa 10071 Back to High School Physics
2016-04-22 22:47
357 查看
Back to High School Physics
Input: standard input
Output: standard output
A particle has initial velocity and constant acceleration. If its velocity after certain time is v then what will its displacement be in twice of that time?
Input
The input will contain two integers in each line. Each line makes one set of input. These two integers denote the value of v (-100 <= v <= 100) and t(0<=t<= 200) ( t means at the time the particle gains that velocity)
Output
For each line of input print a single integer in one line denoting the displacement in double of that time.
Sample Input
0 0
5 12
分析:
公式。水
#include "iostream"
using namespace std;
int main()
{
int v, t;
while(cin>>v>>t)
cout<<(2*v*t)<<endl;
return 0;
}
Input: standard input
Output: standard output
A particle has initial velocity and constant acceleration. If its velocity after certain time is v then what will its displacement be in twice of that time?
Input
The input will contain two integers in each line. Each line makes one set of input. These two integers denote the value of v (-100 <= v <= 100) and t(0<=t<= 200) ( t means at the time the particle gains that velocity)
Output
For each line of input print a single integer in one line denoting the displacement in double of that time.
Sample Input
0 0
5 12
分析:
公式。水
#include "iostream"
using namespace std;
int main()
{
int v, t;
while(cin>>v>>t)
cout<<(2*v*t)<<endl;
return 0;
}
相关文章推荐
- 基于功能安全标准IEC61508的嵌入式设计流程
- 字符串问题经典问题
- HDOJ(HDU) 1985 Conversions(汇率转换)
- 数据结构报告
- 趣味素数-金蝉素数-java
- Java基础数据结构和算法
- gulp:更简单的自动化构建工具
- JavaMelody应用监控使用指南
- win 7下卸载Apache
- 个人笔记 java第二季
- Android开发之使用Tween动画
- JavaMelody应用监控使用指南
- Karaf+JETTY 又挂了?
- Laravel 5系列教程六:表单 Forms
- ARM的FP寄存器
- 与网络公司合作建站流程和注意事项
- (4.1.5.3) Android之粘性广播理解
- //让列表自动滚动到正在播放的cell上
- Laravel 5系列教程五:MVC的基本流程
- Laravel 5系列教程四:数据库和Eloquent