結果

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

テストケース

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

ソースコード

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