UVa 10071 back to High School physics (Water ver.)

Source: Internet
Author: User
Tags time limit

10071-back to High School physics

Time limit:3.000 seconds

Http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=94&page=show_problem &problem=1012

A particle has initial velocity and constant acceleration. If it velocity after certain the time is V then what'll its displacement being in twice of?

Input

The input would contain two integers in each line. Each line makes one set of input. These two integers denote the value of V ( -100 <= v-<=) and T (0<=t<=) (t means at the time the Partic Le gains that velocity)

Output

For the, input print a single integer in one line denoting the "displacement in double".

Sample Input

0 0
5 12

Sample Output

0
120

Complete code:

/*0.029s*/
  
#include <cstdio>
  
int main (void)
{
    int v, t;
    while (~SCANF ("%d%d", &v, &t)
        printf ("%d\n", V * t << 1);
    return 0;
}

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/Programming/sjjg/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.