結果

問題 No.46 はじめのn歩
ユーザー fkwnw3_1243fkwnw3_1243
提出日時 2017-04-23 21:14:11
言語 Java21
(openjdk 21)
結果
AC  
実行時間 40 ms / 5,000 ms
コード長 542 bytes
コンパイル時間 5,811 ms
コンパイル使用メモリ 70,720 KB
実行使用メモリ 49,692 KB
最終ジャッジ日時 2023-09-29 16:00:51
合計ジャッジ時間 3,185 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
49,320 KB
testcase_01 AC 39 ms
47,212 KB
testcase_02 AC 39 ms
49,688 KB
testcase_03 AC 40 ms
49,144 KB
testcase_04 AC 39 ms
49,164 KB
testcase_05 AC 40 ms
49,384 KB
testcase_06 AC 40 ms
49,676 KB
testcase_07 AC 39 ms
49,324 KB
testcase_08 AC 39 ms
49,680 KB
testcase_09 AC 39 ms
49,692 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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

0