結果

問題 No.63 ポッキーゲーム
ユーザー TakaTaka
提出日時 2016-04-09 16:32:28
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 355 bytes
コンパイル時間 1,830 ms
コンパイル使用メモリ 74,676 KB
実行使用メモリ 54,324 KB
最終ジャッジ日時 2024-04-14 23:32:06
合計ジャッジ時間 6,701 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 133 ms
54,208 KB
testcase_01 AC 132 ms
54,108 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 126 ms
54,292 KB
testcase_05 AC 137 ms
53,976 KB
testcase_06 AC 129 ms
53,868 KB
testcase_07 AC 130 ms
54,204 KB
testcase_08 AC 136 ms
54,324 KB
testcase_09 AC 135 ms
53,820 KB
testcase_10 AC 141 ms
54,084 KB
testcase_11 AC 389 ms
54,180 KB
testcase_12 AC 142 ms
54,100 KB
testcase_13 AC 400 ms
54,116 KB
testcase_14 AC 141 ms
53,988 KB
testcase_15 AC 142 ms
53,992 KB
testcase_16 AC 144 ms
53,844 KB
testcase_17 AC 387 ms
54,112 KB
testcase_18 AC 138 ms
53,988 KB
testcase_19 AC 174 ms
54,228 KB
testcase_20 AC 139 ms
53,908 KB
testcase_21 AC 148 ms
53,912 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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