結果

問題 No.63 ポッキーゲーム
ユーザー hippolover02hippolover02
提出日時 2022-07-25 11:48:54
言語 Java21
(openjdk 21)
結果
AC  
実行時間 506 ms / 5,000 ms
コード長 367 bytes
コンパイル時間 4,145 ms
コンパイル使用メモリ 71,072 KB
実行使用メモリ 56,260 KB
最終ジャッジ日時 2023-09-21 15:13:30
合計ジャッジ時間 7,972 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
56,260 KB
testcase_01 AC 126 ms
55,660 KB
testcase_02 AC 125 ms
56,016 KB
testcase_03 AC 124 ms
55,840 KB
testcase_04 AC 123 ms
55,444 KB
testcase_05 AC 124 ms
56,032 KB
testcase_06 AC 124 ms
55,812 KB
testcase_07 AC 129 ms
55,840 KB
testcase_08 AC 126 ms
55,896 KB
testcase_09 AC 129 ms
56,036 KB
testcase_10 AC 132 ms
56,168 KB
testcase_11 AC 504 ms
56,012 KB
testcase_12 AC 138 ms
55,852 KB
testcase_13 AC 506 ms
55,524 KB
testcase_14 AC 137 ms
55,948 KB
testcase_15 AC 137 ms
55,952 KB
testcase_16 AC 129 ms
56,120 KB
testcase_17 AC 481 ms
55,756 KB
testcase_18 AC 131 ms
55,660 KB
testcase_19 AC 180 ms
55,656 KB
testcase_20 AC 135 ms
55,800 KB
testcase_21 AC 147 ms
55,852 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int len = sc.nextInt();
        int bite = sc.nextInt();
        int eat = 0;
        
        while((len - bite * 2) > 0){
            len -= bite * 2;
            eat += bite;
        }
        System.out.println(eat);
    }
}
0