結果

問題 No.46 はじめのn歩
ユーザー noiunoiu
提出日時 2016-06-30 02:07:06
言語 Java21
(openjdk 21)
結果
AC  
実行時間 601 ms / 5,000 ms
コード長 356 bytes
コンパイル時間 1,938 ms
コンパイル使用メモリ 74,168 KB
実行使用メモリ 41,536 KB
最終ジャッジ日時 2024-04-20 04:16:08
合計ジャッジ時間 4,261 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 113 ms
41,200 KB
testcase_01 AC 122 ms
40,940 KB
testcase_02 AC 124 ms
41,508 KB
testcase_03 AC 124 ms
41,232 KB
testcase_04 AC 118 ms
41,440 KB
testcase_05 AC 125 ms
41,536 KB
testcase_06 AC 126 ms
41,240 KB
testcase_07 AC 124 ms
41,364 KB
testcase_08 AC 601 ms
41,236 KB
testcase_09 AC 123 ms
41,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = 0;
        int d = 0;
        
        while(c<b) {
            c += a;
            d += 1;
        }
        System.out.println(d);  
    }
}
0