結果

問題 No.63 ポッキーゲーム
ユーザー yuuki121yuuki121
提出日時 2020-12-29 23:58:45
言語 Java21
(openjdk 21)
結果
AC  
実行時間 353 ms / 5,000 ms
コード長 543 bytes
コンパイル時間 2,569 ms
コンパイル使用メモリ 79,384 KB
実行使用メモリ 38,504 KB
最終ジャッジ日時 2024-04-16 00:38:28
合計ジャッジ時間 6,165 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
38,056 KB
testcase_01 AC 65 ms
37,796 KB
testcase_02 AC 66 ms
37,956 KB
testcase_03 AC 66 ms
37,800 KB
testcase_04 AC 67 ms
38,044 KB
testcase_05 AC 65 ms
37,972 KB
testcase_06 AC 66 ms
37,972 KB
testcase_07 AC 72 ms
37,864 KB
testcase_08 AC 68 ms
38,080 KB
testcase_09 AC 73 ms
38,424 KB
testcase_10 AC 75 ms
38,236 KB
testcase_11 AC 353 ms
38,500 KB
testcase_12 AC 76 ms
38,184 KB
testcase_13 AC 352 ms
38,304 KB
testcase_14 AC 78 ms
38,220 KB
testcase_15 AC 79 ms
38,504 KB
testcase_16 AC 73 ms
38,436 KB
testcase_17 AC 341 ms
38,408 KB
testcase_18 AC 71 ms
38,036 KB
testcase_19 AC 109 ms
38,368 KB
testcase_20 AC 78 ms
38,384 KB
testcase_21 AC 85 ms
38,196 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.stream.Stream;

public class Main {

	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		// L K
		int[] lk = Stream.of(br.readLine().split(" ")).mapToInt(Integer::parseInt).toArray();
		int numL = lk[0];
		int numK = lk[1];

		int count = 0;

		while (numL > numK * 2 * count) {
			count++;
		}

		System.out.println(numK * (count - 1));

	}

}
0