結果

問題 No.63 ポッキーゲーム
ユーザー marumaru
提出日時 2016-03-22 23:14:31
言語 Java21
(openjdk 21)
結果
AC  
実行時間 358 ms / 5,000 ms
コード長 320 bytes
コンパイル時間 2,984 ms
コンパイル使用メモリ 72,364 KB
実行使用メモリ 56,440 KB
最終ジャッジ日時 2023-08-25 19:05:44
合計ジャッジ時間 7,452 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
56,040 KB
testcase_01 AC 119 ms
55,776 KB
testcase_02 AC 120 ms
55,944 KB
testcase_03 AC 120 ms
56,068 KB
testcase_04 AC 120 ms
56,056 KB
testcase_05 AC 119 ms
55,908 KB
testcase_06 AC 118 ms
56,076 KB
testcase_07 AC 121 ms
56,036 KB
testcase_08 AC 119 ms
55,952 KB
testcase_09 AC 124 ms
54,408 KB
testcase_10 AC 125 ms
56,016 KB
testcase_11 AC 355 ms
55,832 KB
testcase_12 AC 128 ms
55,928 KB
testcase_13 AC 358 ms
56,276 KB
testcase_14 AC 126 ms
56,280 KB
testcase_15 AC 126 ms
56,068 KB
testcase_16 AC 123 ms
55,544 KB
testcase_17 AC 345 ms
55,836 KB
testcase_18 AC 121 ms
56,028 KB
testcase_19 AC 154 ms
56,440 KB
testcase_20 AC 125 ms
55,532 KB
testcase_21 AC 132 ms
56,032 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class yukicoder_63 {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		
		int l = stdIn.nextInt();
		int k = stdIn.nextInt();
		
		int count = 0;
		
		while (l >= 2 * k + 1) {
			l = l - 2 * k;
			count++;
		}
		
		System.out.println(k * count);
	}
}
0