結果

問題 No.63 ポッキーゲーム
ユーザー yagi2yagi2
提出日時 2017-04-25 17:11:15
言語 Java21
(openjdk 21)
結果
AC  
実行時間 119 ms / 5,000 ms
コード長 325 bytes
コンパイル時間 2,339 ms
コンパイル使用メモリ 71,568 KB
実行使用メモリ 56,448 KB
最終ジャッジ日時 2023-08-25 19:27:03
合計ジャッジ時間 6,554 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,584 KB
testcase_01 AC 118 ms
55,512 KB
testcase_02 AC 116 ms
55,356 KB
testcase_03 AC 117 ms
55,556 KB
testcase_04 AC 119 ms
55,616 KB
testcase_05 AC 117 ms
55,612 KB
testcase_06 AC 116 ms
55,328 KB
testcase_07 AC 116 ms
55,752 KB
testcase_08 AC 116 ms
55,688 KB
testcase_09 AC 117 ms
55,420 KB
testcase_10 AC 117 ms
56,028 KB
testcase_11 AC 117 ms
55,820 KB
testcase_12 AC 116 ms
56,448 KB
testcase_13 AC 118 ms
55,876 KB
testcase_14 AC 117 ms
55,640 KB
testcase_15 AC 116 ms
55,812 KB
testcase_16 AC 116 ms
55,688 KB
testcase_17 AC 118 ms
55,640 KB
testcase_18 AC 118 ms
53,532 KB
testcase_19 AC 119 ms
55,644 KB
testcase_20 AC 115 ms
55,424 KB
testcase_21 AC 117 ms
55,808 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long L = Long.parseLong(sc.next());
        int K = Integer.parseInt(sc.next());

        int num = (int)Math.ceil(L / 2.0 / K);
        System.out.println(K * (num - 1));
    }
}
0