結果

問題 No.63 ポッキーゲーム
ユーザー ダンネックダンネック
提出日時 2020-05-24 10:57:12
言語 Java21
(openjdk 21)
結果
AC  
実行時間 459 ms / 5,000 ms
コード長 331 bytes
コンパイル時間 3,692 ms
コンパイル使用メモリ 74,436 KB
実行使用メモリ 41,444 KB
最終ジャッジ日時 2024-04-19 09:20:47
合計ジャッジ時間 8,690 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 138 ms
40,836 KB
testcase_01 AC 141 ms
41,364 KB
testcase_02 AC 142 ms
41,288 KB
testcase_03 AC 120 ms
39,904 KB
testcase_04 AC 140 ms
40,976 KB
testcase_05 AC 141 ms
41,160 KB
testcase_06 AC 144 ms
41,256 KB
testcase_07 AC 148 ms
41,236 KB
testcase_08 AC 131 ms
41,184 KB
testcase_09 AC 134 ms
41,388 KB
testcase_10 AC 136 ms
41,256 KB
testcase_11 AC 459 ms
40,752 KB
testcase_12 AC 141 ms
41,144 KB
testcase_13 AC 448 ms
40,060 KB
testcase_14 AC 124 ms
41,124 KB
testcase_15 AC 122 ms
39,884 KB
testcase_16 AC 125 ms
41,352 KB
testcase_17 AC 454 ms
41,280 KB
testcase_18 AC 128 ms
41,120 KB
testcase_19 AC 190 ms
41,248 KB
testcase_20 AC 149 ms
41,444 KB
testcase_21 AC 149 ms
40,064 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Arrays;
import java.util.Scanner;
public class length{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
	    int a = sc.nextInt();
	    int b = sc.nextInt();
	    int c = 0;
        while(a > b*2){
			a -= b*2;
			c+=1;
		}
		System.out.println(b * c);
		sc.close();
    }
}
0