結果

問題 No.46 はじめのn歩
ユーザー face4face4
提出日時 2018-04-09 17:20:01
言語 Java21
(openjdk 21)
結果
AC  
実行時間 44 ms / 5,000 ms
コード長 496 bytes
コンパイル時間 2,378 ms
コンパイル使用メモリ 72,104 KB
実行使用メモリ 49,480 KB
最終ジャッジ日時 2023-09-09 03:28:19
合計ジャッジ時間 3,309 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
49,216 KB
testcase_01 AC 43 ms
49,420 KB
testcase_02 AC 42 ms
49,340 KB
testcase_03 AC 42 ms
49,224 KB
testcase_04 AC 42 ms
49,428 KB
testcase_05 AC 43 ms
49,252 KB
testcase_06 AC 42 ms
49,480 KB
testcase_07 AC 44 ms
49,332 KB
testcase_08 AC 43 ms
49,308 KB
testcase_09 AC 43 ms
49,452 KB
権限があれば一括ダウンロードができます

ソースコード

diff #


import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;

class Main{
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] input = br.readLine().split(" ");
        int a = Integer.parseInt(input[0]);
        int b = Integer.parseInt(input[1]); 

        int result = b / a + ((b % a == 0) ? 0 : 1);
        System.out.println(result);
    }
}      
0