結果

問題 No.46 はじめのn歩
ユーザー oyafusooyafuso
提出日時 2019-03-11 10:54:29
言語 Java21
(openjdk 21)
結果
AC  
実行時間 122 ms / 5,000 ms
コード長 728 bytes
コンパイル時間 2,870 ms
コンパイル使用メモリ 76,816 KB
実行使用メモリ 56,108 KB
最終ジャッジ日時 2023-09-05 20:03:46
合計ジャッジ時間 4,057 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,656 KB
testcase_01 AC 120 ms
55,864 KB
testcase_02 AC 121 ms
55,736 KB
testcase_03 AC 121 ms
56,108 KB
testcase_04 AC 120 ms
55,452 KB
testcase_05 AC 122 ms
54,076 KB
testcase_06 AC 122 ms
55,516 KB
testcase_07 AC 119 ms
55,716 KB
testcase_08 AC 121 ms
55,908 KB
testcase_09 AC 121 ms
55,540 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class Main {

	private static final String SPLIT_STR = " ";

	public static void main(String[] args) {
		// Scanner生成
		Scanner sc = new Scanner(System.in);
		// 入力設定
		String input = sc.nextLine();
		String[] split = input.split(SPLIT_STR);
		List<Integer> numList = new ArrayList<>(split.length);
		for (int i = 0; i < split.length; i++) {
			numList.add(Integer.parseInt(split[i]));
		}
		// Scannerクローズ
		sc.close();

		/* メイン処理開始 */
		// 変数初期化
		int result = 0;
		int a = numList.get(0);
		int b = numList.get(1);
		// 結果設定
		result = (int)Math.ceil((double)b / a);
		/* メイン処理終了 */

		// 結果出力
		System.out.println(result);
	}
}
0