結果

問題 No.1579 New Type of Nim
ユーザー ks2mks2m
提出日時 2021-07-02 21:56:12
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 334 bytes
コンパイル時間 3,557 ms
コンパイル使用メモリ 70,868 KB
実行使用メモリ 57,584 KB
最終ジャッジ日時 2023-09-11 21:48:58
合計ジャッジ時間 8,285 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
55,768 KB
testcase_01 AC 124 ms
55,652 KB
testcase_02 AC 125 ms
55,908 KB
testcase_03 AC 123 ms
55,688 KB
testcase_04 AC 124 ms
55,920 KB
testcase_05 AC 123 ms
55,584 KB
testcase_06 AC 124 ms
55,588 KB
testcase_07 AC 124 ms
55,680 KB
testcase_08 AC 123 ms
55,612 KB
testcase_09 AC 124 ms
55,620 KB
testcase_10 AC 123 ms
55,604 KB
testcase_11 AC 126 ms
55,476 KB
testcase_12 AC 125 ms
55,640 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 126 ms
55,600 KB
testcase_16 WA -
testcase_17 AC 124 ms
55,668 KB
testcase_18 AC 126 ms
55,332 KB
testcase_19 AC 128 ms
55,880 KB
testcase_20 AC 125 ms
55,532 KB
testcase_21 AC 125 ms
55,540 KB
testcase_22 AC 123 ms
53,428 KB
testcase_23 AC 125 ms
55,460 KB
testcase_24 AC 123 ms
55,824 KB
testcase_25 AC 123 ms
55,616 KB
testcase_26 AC 124 ms
55,652 KB
testcase_27 WA -
testcase_28 AC 121 ms
55,480 KB
testcase_29 AC 122 ms
55,700 KB
testcase_30 WA -
testcase_31 AC 124 ms
55,928 KB
testcase_32 AC 125 ms
55,764 KB
testcase_33 AC 126 ms
55,496 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		sc.close();

		if (Math.abs(a - b) <= 1 && (a + b) % 4 == 3) {
			System.out.println("Q");
		} else {
			System.out.println("P");
		}
	}
}
0