結果

問題 No.63 ポッキーゲーム
ユーザー YOSHIYOSHI
提出日時 2021-02-27 10:36:31
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 564 bytes
コンパイル時間 3,830 ms
コンパイル使用メモリ 84,300 KB
実行使用メモリ 51,120 KB
最終ジャッジ日時 2024-04-10 15:21:05
合計ジャッジ時間 6,130 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
50,448 KB
testcase_01 AC 61 ms
50,704 KB
testcase_02 AC 60 ms
50,876 KB
testcase_03 AC 58 ms
50,856 KB
testcase_04 AC 55 ms
50,832 KB
testcase_05 AC 53 ms
50,612 KB
testcase_06 AC 56 ms
51,056 KB
testcase_07 AC 53 ms
50,460 KB
testcase_08 AC 56 ms
50,576 KB
testcase_09 AC 56 ms
50,700 KB
testcase_10 AC 58 ms
50,860 KB
testcase_11 AC 59 ms
50,712 KB
testcase_12 AC 56 ms
50,992 KB
testcase_13 WA -
testcase_14 AC 57 ms
50,760 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 56 ms
50,632 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.stream.Stream;

public class No00000063_Main {

	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        int[] arr = Stream.of(br.readLine().split(" ")).mapToInt(Integer::parseInt).toArray();
        int i = arr[0] / arr[1] == 0 && (arr[0] / arr[1]) %  2 == 0 ? 1 : 0;
		System.out.println(arr[0] <= 2 * arr[1] ? 0 : (((arr[0] / arr[1]) / 2 - i) * arr[1]));

	}

}
0