結果

問題 No.46 はじめのn歩
ユーザー n_gojon_gojo
提出日時 2020-04-09 10:27:32
言語 Java21
(openjdk 21)
結果
AC  
実行時間 132 ms / 5,000 ms
コード長 440 bytes
コンパイル時間 3,881 ms
コンパイル使用メモリ 72,568 KB
実行使用メモリ 55,992 KB
最終ジャッジ日時 2023-09-29 01:10:22
合計ジャッジ時間 6,593 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
55,564 KB
testcase_01 AC 130 ms
55,776 KB
testcase_02 AC 128 ms
55,648 KB
testcase_03 AC 129 ms
55,620 KB
testcase_04 AC 129 ms
55,812 KB
testcase_05 AC 132 ms
55,992 KB
testcase_06 AC 127 ms
55,768 KB
testcase_07 AC 127 ms
55,548 KB
testcase_08 AC 130 ms
55,692 KB
testcase_09 AC 130 ms
55,812 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No46 {
    public static void main(String[] args) {
        // 標準入力から読み込む際に、Scannerオブジェクトを使う。
        Scanner sc = new Scanner(System.in);

        // int 1つ分を読み込む
        int a = sc.nextInt();
        int b = sc.nextInt();
        int ans = b/a;
        if (b%a>0) {
            ans++;
        }
        System.out.println(ans);
    }
}
0