結果

問題 No.63 ポッキーゲーム
ユーザー kano_townkano_town
提出日時 2014-11-19 09:39:15
言語 Java21
(openjdk 21)
結果
AC  
実行時間 417 ms / 5,000 ms
コード長 326 bytes
コンパイル時間 3,036 ms
コンパイル使用メモリ 72,444 KB
実行使用メモリ 56,472 KB
最終ジャッジ日時 2023-08-25 18:46:22
合計ジャッジ時間 7,816 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
56,044 KB
testcase_01 AC 123 ms
56,016 KB
testcase_02 AC 123 ms
55,688 KB
testcase_03 AC 122 ms
55,668 KB
testcase_04 AC 121 ms
55,952 KB
testcase_05 AC 120 ms
55,804 KB
testcase_06 AC 123 ms
56,024 KB
testcase_07 AC 123 ms
56,472 KB
testcase_08 AC 123 ms
55,588 KB
testcase_09 AC 125 ms
55,576 KB
testcase_10 AC 130 ms
56,000 KB
testcase_11 AC 417 ms
55,940 KB
testcase_12 AC 135 ms
56,048 KB
testcase_13 AC 416 ms
55,948 KB
testcase_14 AC 132 ms
55,624 KB
testcase_15 AC 132 ms
56,004 KB
testcase_16 AC 127 ms
55,904 KB
testcase_17 AC 394 ms
55,676 KB
testcase_18 AC 127 ms
55,932 KB
testcase_19 AC 163 ms
55,728 KB
testcase_20 AC 130 ms
55,412 KB
testcase_21 AC 139 ms
55,744 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Yukicoder63 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int L = sc.nextInt();
		int K = sc.nextInt();
		int res = 0;
		
		while(L > 0) {
			L -= K * 2;
			if (L > 0) {
				res += K;
			}
		}
		System.out.println(res);
	}

}
0