結果

問題 No.63 ポッキーゲーム
ユーザー Ryota EnokidoRyota Enokido
提出日時 2018-12-12 10:04:41
言語 Java21
(openjdk 21)
結果
AC  
実行時間 424 ms / 5,000 ms
コード長 516 bytes
コンパイル時間 2,065 ms
コンパイル使用メモリ 74,360 KB
実行使用メモリ 57,876 KB
最終ジャッジ日時 2023-10-25 08:21:02
合計ジャッジ時間 7,443 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 132 ms
57,524 KB
testcase_01 AC 133 ms
57,668 KB
testcase_02 AC 134 ms
57,616 KB
testcase_03 AC 135 ms
57,596 KB
testcase_04 AC 135 ms
57,628 KB
testcase_05 AC 135 ms
57,640 KB
testcase_06 AC 135 ms
57,576 KB
testcase_07 AC 137 ms
55,856 KB
testcase_08 AC 135 ms
57,424 KB
testcase_09 AC 136 ms
57,612 KB
testcase_10 AC 141 ms
57,756 KB
testcase_11 AC 419 ms
57,572 KB
testcase_12 AC 143 ms
57,564 KB
testcase_13 AC 424 ms
57,740 KB
testcase_14 AC 145 ms
57,600 KB
testcase_15 AC 141 ms
57,876 KB
testcase_16 AC 137 ms
57,732 KB
testcase_17 AC 399 ms
57,636 KB
testcase_18 AC 138 ms
57,652 KB
testcase_19 AC 175 ms
57,848 KB
testcase_20 AC 142 ms
57,616 KB
testcase_21 AC 148 ms
57,680 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
import java.lang.Math;

    public class Main {
        public static void main(String[] args) {
            Scanner sc = new Scanner(System.in);
            
            int L = sc.nextInt();
            int K = sc.nextInt();
            
            int ans = 0;
            while(L>0){
                L -= 2*K;
                if(L<=0){
                    break;
                }
                ans++;
            }
            System.out.println(ans*K);
            
        }
    }
0