結果

問題 No.46 はじめのn歩
ユーザー jipo sylphjipo sylph
提出日時 2021-03-04 21:46:24
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 542 bytes
コンパイル時間 2,153 ms
コンパイル使用メモリ 74,284 KB
実行使用メモリ 54,664 KB
最終ジャッジ日時 2024-04-15 13:46:43
合計ジャッジ時間 4,095 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 135 ms
53,888 KB
testcase_01 WA -
testcase_02 AC 137 ms
54,164 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 137 ms
54,664 KB
testcase_07 WA -
testcase_08 AC 139 ms
54,472 KB
testcase_09 AC 135 ms
54,116 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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

        // int 1つ分を読み込む
        int a = sc.nextInt();

        // int 1つ分を読み込む
        int b = sc.nextInt();

        int hosu = b / a;
        
        if (b % a > a) {
            System.out.println(hosu + 1);
        } else {
            System.out.println(hosu);
        }
    }
}
0