結果

問題 No.46 はじめのn歩
ユーザー kazapyon27kazapyon27
提出日時 2017-05-02 22:05:49
言語 Java21
(openjdk 21)
結果
AC  
実行時間 122 ms / 5,000 ms
コード長 402 bytes
コンパイル時間 3,125 ms
コンパイル使用メモリ 72,232 KB
実行使用メモリ 56,344 KB
最終ジャッジ日時 2023-10-12 05:18:20
合計ジャッジ時間 5,085 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,668 KB
testcase_01 AC 120 ms
56,344 KB
testcase_02 AC 120 ms
56,088 KB
testcase_03 AC 118 ms
56,104 KB
testcase_04 AC 120 ms
55,700 KB
testcase_05 AC 120 ms
56,176 KB
testcase_06 AC 119 ms
56,024 KB
testcase_07 AC 120 ms
56,052 KB
testcase_08 AC 118 ms
55,464 KB
testcase_09 AC 120 ms
55,900 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
public class No46 {
	public static void main(String[] args) {
		int speed,distance,time=0;
		try(Scanner input =new Scanner(System.in)){
			speed = input.nextInt();
			distance =input.nextInt();
			time=distance/speed;
			if(distance%speed!=0){
				System.out.println(time+1);				
			}else{
				System.out.println(time);
			}

		}catch(Exception e){
			e.printStackTrace();
		}
	}
}
0