結果

問題 No.46 はじめのn歩
ユーザー soujikisoujiki
提出日時 2015-04-27 11:54:44
言語 Java19
(openjdk 21)
結果
AC  
実行時間 1,069 ms / 5,000 ms
コード長 332 bytes
コンパイル時間 2,974 ms
コンパイル使用メモリ 72,712 KB
実行使用メモリ 56,448 KB
最終ジャッジ日時 2023-09-18 13:48:04
合計ジャッジ時間 5,932 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
56,448 KB
testcase_01 AC 120 ms
55,736 KB
testcase_02 AC 122 ms
55,808 KB
testcase_03 AC 124 ms
55,824 KB
testcase_04 AC 123 ms
56,172 KB
testcase_05 AC 123 ms
56,092 KB
testcase_06 AC 124 ms
56,084 KB
testcase_07 AC 124 ms
55,912 KB
testcase_08 AC 1,069 ms
55,848 KB
testcase_09 AC 119 ms
55,980 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Yukicoder_46{
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		long a = stdIn.nextInt();
		long b = stdIn.nextInt();
		long dis = 0;
		int count = 0;
		while(true){
			dis += a;
			count++;
			if(b<=dis){
				System.out.println(count);
				break;
			}
		}
	}
}
0