結果

問題 No.46 はじめのn歩
ユーザー matsuyoshi30matsuyoshi30
提出日時 2015-12-29 01:58:30
言語 Java21
(openjdk 21)
結果
AC  
実行時間 131 ms / 5,000 ms
コード長 425 bytes
コンパイル時間 2,094 ms
コンパイル使用メモリ 74,300 KB
実行使用メモリ 57,680 KB
最終ジャッジ日時 2023-10-19 12:13:02
合計ジャッジ時間 4,127 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 128 ms
57,680 KB
testcase_01 AC 127 ms
57,508 KB
testcase_02 AC 130 ms
57,252 KB
testcase_03 AC 128 ms
57,508 KB
testcase_04 AC 131 ms
57,472 KB
testcase_05 AC 129 ms
57,132 KB
testcase_06 AC 128 ms
57,444 KB
testcase_07 AC 129 ms
57,156 KB
testcase_08 AC 130 ms
57,488 KB
testcase_09 AC 129 ms
57,368 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Test {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String str1 = in.next();
        String str2 = in.next();
        int n1 = Integer.parseInt(str1);
        int n2 = Integer.parseInt(str2);
        if(n2 % n1 == 0) {
            System.out.println(n2 / n1);
        } else {
            System.out.println(n2 / n1 + 1);
        }
    }
}
0