UVA 10071 - Back to High School Physics

来源:互联网 发布:樱桃初夏网络剧网盘 编辑:程序博客网 时间:2024/05/16 18:29

1、题目


题目来源:UVA 10055 - Hashmat the Brave Warrior



2、分析


这是一道入门题。题目本身很简单,涉及到一点高中物理的基本知识。
/*UVA 10071 - Back to High School Physics题目大意:一个物体做匀加速直线运动,现在已知在t时刻物体的速度  为v,求物体在2t时间内的总位移。题目分析:高中物理知识。由于是匀加速直线运动,在2t内物体的平均  速度就是t时刻时物体的速度。v0.1 accepted , 用时0.009s.*/

3、代码


最终的版本为:
#include <cstdio>#define ZHAO_DEBUG 0using namespace std;int main(){#if ZHAO_DEBUGfreopen("1.txt" , "r" , stdin);#endifint v , t;while(scanf("%d%d" , &v , &t) == 2)printf("%d\n" , 2 * v * t);return 0;}



0 0