結果

問題 No.63 ポッキーゲーム
ユーザー yuuki121yuuki121
提出日時 2020-12-29 23:59:20
言語 Java19
(openjdk 21)
結果
AC  
実行時間 340 ms / 5,000 ms
コード長 543 bytes
コンパイル時間 2,313 ms
コンパイル使用メモリ 74,404 KB
実行使用メモリ 51,796 KB
最終ジャッジ日時 2023-07-28 16:22:56
合計ジャッジ時間 5,702 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
50,540 KB
testcase_01 AC 55 ms
50,936 KB
testcase_02 AC 54 ms
50,692 KB
testcase_03 AC 55 ms
51,072 KB
testcase_04 AC 54 ms
50,828 KB
testcase_05 AC 55 ms
50,908 KB
testcase_06 AC 54 ms
51,004 KB
testcase_07 AC 56 ms
51,368 KB
testcase_08 AC 54 ms
50,664 KB
testcase_09 AC 61 ms
51,152 KB
testcase_10 AC 62 ms
51,500 KB
testcase_11 AC 338 ms
51,432 KB
testcase_12 AC 65 ms
51,364 KB
testcase_13 AC 340 ms
51,480 KB
testcase_14 AC 65 ms
51,128 KB
testcase_15 AC 64 ms
50,972 KB
testcase_16 AC 58 ms
51,368 KB
testcase_17 AC 324 ms
51,428 KB
testcase_18 AC 60 ms
51,068 KB
testcase_19 AC 96 ms
51,796 KB
testcase_20 AC 62 ms
51,340 KB
testcase_21 AC 71 ms
51,124 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