UVA 10071 Back to High School Physics
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 05 12
Sample Output
0120
//#define RUN #ifdef RUN #include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include <string> #include <iostream> #include <sstream> #include <map> #include <set> #include <vector> #include <list> #include <cctype> #include <algorithm> #include <utility> #include <math.h> using namespace std; #define MAXN 1000 int main(){ #ifndef ONLINE_JUDGE freopen("10071.in", "r", stdin); freopen("10071.out", "w", stdout); #endif long int a, b; while (scanf("%ld%ld", &a, &b) == 2) { printf("%ld\n", 2*a*b); } return 0; } #endif