題目概要:
求出2倍時間的距離。
解題方向:
使用S=V*T*2,即可求出答案。
程式碼:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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); | |
} | |
} | |
} |
文章標籤
全站熱搜