UVA 10071: Back to High School Physics

Jasonlin posted @ 2011年3月25日 22:26 in UVA , 2240 阅读

题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=12&problem=1012&mosmsg=Submission+received+with+ID+8679275

题目大意:

      这是一道高中物理题,一个物体初速度为0,在t时间的速度为v,求在2t时刻这个物理走过的路程是多少。

解题思路:

      因为加速度a=v/t,路程s=(a*t^2)/2,所以2t时刻的路程为s=2*v*t.

解题代码:

#include<iostream>
using namespace std;
int main(){
    int v,t;
    while(cin>>v>>t){
        cout<<2*v*t<<endl;
    }
    return 0;
}

扩展知识:http://en.wikipedia.org/wiki/Acceleration

  • 无匹配
  • 无匹配

登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter