結果

問題 No.1579 New Type of Nim
ユーザー ks2mks2m
提出日時 2021-07-02 21:55:01
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 314 bytes
コンパイル時間 2,545 ms
コンパイル使用メモリ 72,080 KB
実行使用メモリ 56,496 KB
最終ジャッジ日時 2023-09-11 21:47:27
合計ジャッジ時間 8,463 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
55,840 KB
testcase_01 AC 122 ms
55,872 KB
testcase_02 AC 122 ms
55,820 KB
testcase_03 AC 123 ms
55,476 KB
testcase_04 AC 121 ms
53,864 KB
testcase_05 AC 123 ms
56,124 KB
testcase_06 AC 125 ms
55,476 KB
testcase_07 AC 123 ms
55,516 KB
testcase_08 AC 123 ms
56,024 KB
testcase_09 AC 123 ms
53,820 KB
testcase_10 AC 123 ms
55,688 KB
testcase_11 AC 125 ms
55,888 KB
testcase_12 AC 123 ms
55,720 KB
testcase_13 AC 123 ms
55,480 KB
testcase_14 AC 123 ms
55,872 KB
testcase_15 WA -
testcase_16 AC 122 ms
55,280 KB
testcase_17 WA -
testcase_18 AC 126 ms
55,836 KB
testcase_19 WA -
testcase_20 AC 122 ms
55,852 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 124 ms
55,680 KB
testcase_24 AC 124 ms
55,524 KB
testcase_25 AC 128 ms
55,476 KB
testcase_26 AC 123 ms
56,064 KB
testcase_27 AC 122 ms
55,448 KB
testcase_28 WA -
testcase_29 AC 122 ms
56,168 KB
testcase_30 AC 123 ms
55,716 KB
testcase_31 AC 123 ms
54,036 KB
testcase_32 AC 122 ms
55,540 KB
testcase_33 AC 123 ms
56,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) {
			System.out.println("Q");
		} else {
			System.out.println("P");
		}
	}
}
0