結果

問題 No.46 はじめのn歩
ユーザー mobius_bkstmobius_bkst
提出日時 2015-04-23 19:41:21
言語 Java21
(openjdk 21)
結果
AC  
実行時間 44 ms / 5,000 ms
コード長 696 bytes
コンパイル時間 3,268 ms
コンパイル使用メモリ 78,472 KB
実行使用メモリ 49,568 KB
最終ジャッジ日時 2023-09-18 08:39:46
合計ジャッジ時間 4,361 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 44 ms
49,296 KB
testcase_01 AC 44 ms
49,384 KB
testcase_02 AC 44 ms
49,272 KB
testcase_03 AC 44 ms
49,432 KB
testcase_04 AC 44 ms
49,248 KB
testcase_05 AC 43 ms
49,556 KB
testcase_06 AC 43 ms
49,568 KB
testcase_07 AC 44 ms
49,556 KB
testcase_08 AC 43 ms
49,340 KB
testcase_09 AC 43 ms
49,288 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

public class No046 {

    /**
     * @param args
     */
    public static void main(String[] args) {
        // TODO 自動生成されたメソッド・スタブ
        try {
            BufferedReader br = new BufferedReader(new InputStreamReader(
                    System.in));
            String[] tmp = br.readLine().split(" ");
            int a = Integer.parseInt(tmp[0]);
            int b = Integer.parseInt(tmp[1]);
            int num = b / a;

            System.out.println(b % a == 0 ? num : num + 1);
        } catch (Exception e) {
            System.err.println("Error:" + e.getMessage());
        }
    }

}
0