結果

問題 No.46 はじめのn歩
ユーザー kitamoto0407kitamoto0407
提出日時 2022-07-10 22:27:57
言語 Java21
(openjdk 21)
結果
AC  
実行時間 42 ms / 5,000 ms
コード長 452 bytes
コンパイル時間 2,181 ms
コンパイル使用メモリ 70,668 KB
実行使用メモリ 49,528 KB
最終ジャッジ日時 2023-09-02 06:21:20
合計ジャッジ時間 3,316 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
49,272 KB
testcase_01 AC 42 ms
49,504 KB
testcase_02 AC 40 ms
49,328 KB
testcase_03 AC 41 ms
49,204 KB
testcase_04 AC 41 ms
49,300 KB
testcase_05 AC 41 ms
49,324 KB
testcase_06 AC 41 ms
49,448 KB
testcase_07 AC 41 ms
49,224 KB
testcase_08 AC 41 ms
49,288 KB
testcase_09 AC 42 ms
49,528 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        
        String[] s = br.readLine().split(" ");
        
        int a = Integer.parseInt(s[0]);
        int b = Integer.parseInt(s[1]);
        
        if(b % a == 0) System.out.println(b / a);
        else           System.out.println((b / a) + 1);
    }
}
0