結果

問題 No.63 ポッキーゲーム
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2016-11-09 21:09:09
言語 Java21
(openjdk 21)
結果
AC  
実行時間 122 ms / 5,000 ms
コード長 282 bytes
コンパイル時間 1,871 ms
コンパイル使用メモリ 71,436 KB
実行使用メモリ 56,260 KB
最終ジャッジ日時 2023-08-25 19:18:32
合計ジャッジ時間 5,702 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,748 KB
testcase_01 AC 119 ms
56,160 KB
testcase_02 AC 119 ms
55,784 KB
testcase_03 AC 120 ms
55,868 KB
testcase_04 AC 121 ms
55,888 KB
testcase_05 AC 122 ms
55,744 KB
testcase_06 AC 121 ms
55,760 KB
testcase_07 AC 120 ms
55,928 KB
testcase_08 AC 120 ms
55,908 KB
testcase_09 AC 120 ms
55,608 KB
testcase_10 AC 122 ms
56,020 KB
testcase_11 AC 121 ms
56,108 KB
testcase_12 AC 122 ms
55,736 KB
testcase_13 AC 119 ms
55,496 KB
testcase_14 AC 118 ms
55,960 KB
testcase_15 AC 121 ms
55,892 KB
testcase_16 AC 120 ms
55,944 KB
testcase_17 AC 119 ms
55,912 KB
testcase_18 AC 119 ms
55,416 KB
testcase_19 AC 121 ms
56,260 KB
testcase_20 AC 121 ms
54,476 KB
testcase_21 AC 120 ms
56,164 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int L = sc.nextInt();
        int K = sc.nextInt();
int r =L/(2*K);

if(L%(2*K)==0){
r=r-1;
}
int a=r*K;
        System.out.println(a);
    }
}
0