UVA oj 10071 Back to High School Physics(简单数学)

原创 2016年06月01日 18:55:31
A particle has initial velocity and 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

题意就是输入一个v,一个t,表示在t时间时质点的速度,问2t时间时,质点为位移。就是高中的知识,V=V0+at,x=2t * V0 + 1/2 * a * (2t)^2.整理一下就可以得到x = 2vt;

#include<cstdio>
using namespace std;

int main()
{
    int v,t;
    while(~scanf("%d%d",&v,&t))
    {
        printf("%d\n",2*v*t);
    }
    return 0;
}

 
版权声明:本文为博主原创文章,未经博主允许不得转载。

UVa 10071

Problem B Back to High School Physics Input: standard input Output: standard output A particle h...

UVA - 10071 Back to High School Physics

Problem B Back to High School Physics Input: standard input Output: standard output   A parti...

UVa 10773 Back to Intermediate Math (数学&速度的分解&陷阱)

10773 - Back to Intermediate Math Time limit: 3.000 seconds http://uva.onlinejudge.org/index.php?opt...

Light OJ 1009 - Back to Underworld

简单的二分图

uva10828 Back to Kernighan-Ritchie

期望dp+高斯约当消元
  • sdfzyhx
  • sdfzyhx
  • 2017年01月12日 17:01
  • 109

UVA 10828 - Back to Kernighan-Ritchie(线性方程组jordan消元)

题目链接10828 - Back to Kernighan-Ritchie分析白书经典题目,每一个顶点用期望的线性性质列出方程.不过要注意特殊情况以及结合具体含义来分析,用gauss_jordan消元...

UVa 11175:From D to E and back(图论)

题目链接:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=845&page=show_pr...

UVa 10828 Back to Kernighan-Ritchie (高斯-约当消元)

UVa 10828 Back to Kernighan-Ritchie题目大意:给出一个程序控制流图,从每个结点出发到其后继结点的概率相等.当执行完一个没有后继的结点后,程序终止.程序总是从编号为1的...

UVa - 11175 - From D to E and Back

Take any directed graph D with n vertices and m edges. You can make the Lying graph E of D in the fo...

UVa 10828 - Back to Kernighan-Ritchie (概率DP 期望 高斯消元)

UVA - 10828 Back to Kernighan-Ritchie Time Limit: 3000MS Memory Limit: Unknown 64bit IO ...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:UVA oj 10071 Back to High School Physics(简单数学)
举报原因:
原因补充:

(最多只允许输入30个字)