題目概要:

求出2倍時間的距離。

解題方向:

使用S=V*T*2,即可求出答案。

程式碼:

//Java
import java.util.Scanner;
class uva10071{
public static void main(String args[]){
Scanner sc=new Scanner(System.in);
while(sc.hasNext()){
int v=sc.nextInt();
int t=sc.nextInt();
System.out.println(v*t*2);
}
}
}
view raw uva10071.java hosted with ❤ by GitHub

arrow
arrow
    文章標籤
    Java
    全站熱搜
    創作者介紹
    創作者 a7069810 的頭像
    a7069810

    紀錄自己的程式人生

    a7069810 發表在 痞客邦 留言(0) 人氣()