結果

問題 No.46 はじめのn歩
ユーザー kazapyon27kazapyon27
提出日時 2017-05-02 02:25:36
言語 Java21
(openjdk 21)
結果
AC  
実行時間 884 ms / 5,000 ms
コード長 359 bytes
コンパイル時間 3,556 ms
コンパイル使用メモリ 72,272 KB
実行使用メモリ 56,108 KB
最終ジャッジ日時 2023-10-12 02:34:56
合計ジャッジ時間 6,474 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 129 ms
55,984 KB
testcase_01 AC 127 ms
55,464 KB
testcase_02 AC 127 ms
55,644 KB
testcase_03 AC 128 ms
53,792 KB
testcase_04 AC 127 ms
55,856 KB
testcase_05 AC 127 ms
53,672 KB
testcase_06 AC 126 ms
55,692 KB
testcase_07 AC 126 ms
55,452 KB
testcase_08 AC 884 ms
55,924 KB
testcase_09 AC 128 ms
56,108 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();
			while(distance>0){
				distance-=speed;
				time++;
			}
			System.out.println(time);
		}catch(Exception e){
			e.printStackTrace();
		}
	}
}
0