結果

問題 No.63 ポッキーゲーム
ユーザー GrenacheGrenache
提出日時 2015-06-30 20:27:53
言語 Java21
(openjdk 21)
結果
AC  
実行時間 122 ms / 5,000 ms
コード長 416 bytes
コンパイル時間 3,678 ms
コンパイル使用メモリ 72,292 KB
実行使用メモリ 57,464 KB
最終ジャッジ日時 2023-08-25 18:53:59
合計ジャッジ時間 6,470 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,860 KB
testcase_01 AC 120 ms
56,320 KB
testcase_02 AC 116 ms
55,992 KB
testcase_03 AC 115 ms
55,824 KB
testcase_04 AC 116 ms
56,324 KB
testcase_05 AC 120 ms
55,744 KB
testcase_06 AC 116 ms
54,292 KB
testcase_07 AC 122 ms
57,464 KB
testcase_08 AC 113 ms
55,684 KB
testcase_09 AC 114 ms
55,940 KB
testcase_10 AC 112 ms
55,500 KB
testcase_11 AC 112 ms
56,312 KB
testcase_12 AC 117 ms
55,748 KB
testcase_13 AC 112 ms
56,216 KB
testcase_14 AC 113 ms
56,168 KB
testcase_15 AC 111 ms
55,908 KB
testcase_16 AC 115 ms
56,348 KB
testcase_17 AC 117 ms
55,944 KB
testcase_18 AC 113 ms
56,104 KB
testcase_19 AC 112 ms
56,052 KB
testcase_20 AC 117 ms
56,000 KB
testcase_21 AC 113 ms
55,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;


public class Main_yukicoder63 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int l = sc.nextInt();
        int k = sc.nextInt();

        if (l % (2 * k) == 0) {
        	System.out.println((l / (2 * k) - 1) * k);
        } else {
        	System.out.println(l / (2 * k) * k);
        }
        
        
        sc.close();
    }
}
0