UVA10071




Sample Input
0 0
5 12
Sample Output
0
120



解法:物理公式

加速度:a 時間:t 初速度:v0

令 v = v0 + a*t

距離為: v0*t+(a*t^2)/2 = 2t*(v0+a*t) = 2*v*t




import java.util.Scanner;

public class UVA10071 {

  public static void main(String[] args) {

   Scanner sc = new Scanner(System.in);

   while (sc.hasNext()) {
   System.out.println(2 * sc.nextInt() * sc.nextInt());
  }

   sc.close();
 }

}