結果

問題 No.46 はじめのn歩
ユーザー vjudge1
提出日時 2025-03-06 13:58:16
言語 Java
(openjdk 23)
結果
AC  
実行時間 125 ms / 5,000 ms
コード長 495 bytes
コンパイル時間 2,734 ms
コンパイル使用メモリ 76,084 KB
実行使用メモリ 54,404 KB
最終ジャッジ日時 2025-03-06 13:58:23
合計ジャッジ時間 4,845 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        
        // Read two integers from input
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        
        // Calculate the result
        int rest = b / a;
        if (b % a != 0) {
            System.out.println(rest + 1);
        } else {
            System.out.println(rest);
        }
        
        scanner.close();
    }
}
0