結果

問題 No.46 はじめのn歩
ユーザー oyafusooyafuso
提出日時 2019-03-11 10:52:07
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 720 bytes
コンパイル時間 2,615 ms
コンパイル使用メモリ 71,996 KB
実行使用メモリ 56,316 KB
最終ジャッジ日時 2023-09-05 20:03:39
合計ジャッジ時間 4,275 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,840 KB
testcase_01 WA -
testcase_02 AC 122 ms
55,472 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 121 ms
55,672 KB
testcase_07 WA -
testcase_08 AC 120 ms
55,484 KB
testcase_09 AC 120 ms
56,060 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(b / a);
		/* メイン処理終了 */

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