結果

問題 No.46 はじめのn歩
ユーザー tokustokus
提出日時 2021-11-22 21:58:57
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 822 bytes
コンパイル時間 2,077 ms
コンパイル使用メモリ 72,132 KB
実行使用メモリ 51,380 KB
最終ジャッジ日時 2023-09-06 16:45:41
合計ジャッジ時間 3,217 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
49,288 KB
testcase_01 AC 42 ms
49,392 KB
testcase_02 AC 40 ms
49,084 KB
testcase_03 AC 40 ms
49,364 KB
testcase_04 WA -
testcase_05 AC 40 ms
49,072 KB
testcase_06 AC 41 ms
49,368 KB
testcase_07 AC 40 ms
49,204 KB
testcase_08 AC 41 ms
49,340 KB
testcase_09 AC 40 ms
49,556 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