Subject to the effect
Original title: http://uva.onlinejudge.org/external/100/10071.pdf
The particle has an initial velocity and acceleration. If, after a certain time after its speed is v twice and then the displacement will be at that time?
Entry
Each row comprising two input integers. Such that each row of a set of inputs. These two integer values of v (-100 <= v <= 100 ) and t (0 <= t <= 200) ( time t obtained by means of the particle velocity)
Export
For each row displaced in a straight line inputted print an integer representation bis time.
Sample Input:
0 0
5 12
Sample Output:
0
120
algorithm:
This is a very simple subject, just note that we do not need to consider the positive and negative speed.
Code: enclose here my code, you can go here to submit your code to verify that your code is correct,
1 #include<stdio.h> 2 int main(void) 3 { 4 5 int v,t,s; 6 7 while(EOF!=scanf("%d %d",&v,&t)) 8 9 { 10 s=2*v*t; 11 12 printf("%d\n",s); 13 } 14 return 0; 15 }
Reproduced in: https: //www.cnblogs.com/qisong178878915/archive/2013/01/31/2888271.html