結果

問題 No.46 はじめのn歩
ユーザー tokustokus
提出日時 2021-11-22 22:08:38
言語 Java21
(openjdk 21)
結果
AC  
実行時間 46 ms / 5,000 ms
コード長 835 bytes
コンパイル時間 2,321 ms
コンパイル使用メモリ 71,448 KB
実行使用メモリ 49,592 KB
最終ジャッジ日時 2023-09-06 16:57:48
合計ジャッジ時間 3,457 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 44 ms
49,592 KB
testcase_01 AC 45 ms
49,412 KB
testcase_02 AC 46 ms
49,284 KB
testcase_03 AC 43 ms
49,384 KB
testcase_04 AC 45 ms
49,416 KB
testcase_05 AC 45 ms
49,204 KB
testcase_06 AC 44 ms
49,396 KB
testcase_07 AC 44 ms
49,384 KB
testcase_08 AC 44 ms
49,192 KB
testcase_09 AC 44 ms
49,292 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.UncheckedIOException;
import java.util.stream.Stream;

class Main {
    public static void main(String[] args) {
        no46();
    }
    // はじめのn歩
    private static void no46(){
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

        // 一歩
        int a;
        // 区間
        int b;

        try {
            String line = reader.readLine();
            String[] lines = line.split(" ");

            a = Integer.parseInt(lines[0]);
            b = Integer.parseInt(lines[1]);

            reader.close();
        } catch (IOException e) {
            throw new UncheckedIOException(e);
        }

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