1、题目
2、分析
这是一道入门题。题目本身很简单,涉及到一点高中物理的基本知识。
/*
UVA 10071 - Back to High School Physics
题目大意:一个物体做匀加速直线运动,现在已知在t时刻物体的速度
为v,求物体在2t时间内的总位移。
题目分析:高中物理知识。由于是匀加速直线运动,在2t内物体的平均
速度就是t时刻时物体的速度。
v0.1 accepted , 用时0.009s.
*/
3、代码
最终的版本为:
#include <cstdio>
#define ZHAO_DEBUG 0
using namespace std;
int main()
{
#if ZHAO_DEBUG
freopen("1.txt" , "r" , stdin);
#endif
int v , t;
while(scanf("%d%d" , &v , &t) == 2)
printf("%d\n" , 2 * v * t);
return 0;
}