結果

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

テストケース

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

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