UVa 10071

Problem B

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

Sample Output

0
120

 

-------------------------------------------------------------------

The input will contain two integers in each line

注意这一句, 有初速度怎么算啊, 算不出来的, 初速度未0;

 

 

无敌水题,代码:

 

#include "iostream"

using namespace std;

int main()
{
 int v, t;
 while(cin>>v>>t)
  cout<<(2*v*t)<<endl;
 return 0;
}

 

 


阅读更多
个人分类: UVa_OJ
想对作者说点什么? 我来说一句

uva最全ac代码

2013年07月04日 4.18MB 下载

100 - The 3n + 1 problem.c

2014年01月26日 936B 下载

没有更多推荐了,返回首页

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭