結果

問題 No.63 ポッキーゲーム
ユーザー kaoetayakaoetaya
提出日時 2016-11-21 19:54:08
言語 Java21
(openjdk 21)
結果
AC  
実行時間 501 ms / 5,000 ms
コード長 282 bytes
コンパイル時間 3,019 ms
コンパイル使用メモリ 71,604 KB
実行使用メモリ 58,100 KB
最終ジャッジ日時 2023-08-25 19:19:19
合計ジャッジ時間 8,029 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
56,016 KB
testcase_01 AC 120 ms
55,936 KB
testcase_02 AC 119 ms
56,072 KB
testcase_03 AC 119 ms
55,468 KB
testcase_04 AC 119 ms
56,296 KB
testcase_05 AC 119 ms
56,004 KB
testcase_06 AC 120 ms
55,784 KB
testcase_07 AC 121 ms
56,016 KB
testcase_08 AC 120 ms
56,500 KB
testcase_09 AC 122 ms
56,308 KB
testcase_10 AC 126 ms
54,212 KB
testcase_11 AC 501 ms
56,920 KB
testcase_12 AC 132 ms
55,788 KB
testcase_13 AC 497 ms
56,008 KB
testcase_14 AC 131 ms
56,208 KB
testcase_15 AC 131 ms
58,100 KB
testcase_16 AC 124 ms
55,808 KB
testcase_17 AC 473 ms
55,536 KB
testcase_18 AC 124 ms
55,960 KB
testcase_19 AC 173 ms
55,548 KB
testcase_20 AC 130 ms
55,816 KB
testcase_21 AC 139 ms
53,952 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class pre {
    public static void main(String[] args) {

        Scanner s = new Scanner(System.in);
		
		int l = s.nextInt(), k = s.nextInt();
		int ans =0;
		while((l - 2*k) >0){
			l -= 2 * k;
			ans += k;
		}
		System.out.println(ans);
    }
}
0