結果

問題 No.63 ポッキーゲーム
ユーザー fkwnw3_1243fkwnw3_1243
提出日時 2017-04-25 22:07:06
言語 Java21
(openjdk 21)
結果
AC  
実行時間 293 ms / 5,000 ms
コード長 558 bytes
コンパイル時間 2,089 ms
コンパイル使用メモリ 73,692 KB
実行使用メモリ 49,780 KB
最終ジャッジ日時 2023-08-25 19:27:33
合計ジャッジ時間 4,917 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
49,220 KB
testcase_01 AC 43 ms
49,576 KB
testcase_02 AC 43 ms
49,108 KB
testcase_03 AC 42 ms
49,320 KB
testcase_04 AC 43 ms
49,096 KB
testcase_05 AC 43 ms
49,268 KB
testcase_06 AC 42 ms
49,376 KB
testcase_07 AC 45 ms
49,216 KB
testcase_08 AC 43 ms
49,140 KB
testcase_09 AC 52 ms
49,312 KB
testcase_10 AC 54 ms
49,704 KB
testcase_11 AC 293 ms
49,752 KB
testcase_12 AC 57 ms
49,588 KB
testcase_13 AC 288 ms
49,780 KB
testcase_14 AC 56 ms
49,668 KB
testcase_15 AC 56 ms
49,660 KB
testcase_16 AC 52 ms
49,644 KB
testcase_17 AC 276 ms
49,700 KB
testcase_18 AC 52 ms
47,664 KB
testcase_19 AC 84 ms
49,616 KB
testcase_20 AC 56 ms
49,580 KB
testcase_21 AC 61 ms
49,664 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String[] inputs = reader.readLine().split(" ");
        long L = Long.parseLong(inputs[0]);
        int K = Integer.parseInt(inputs[1]);

        int yuu = 0;
        while (2*K < L) {
            yuu += K;
            L -= 2 * K;
        }

        System.out.println(yuu);

    }

}
0