結果
| 問題 | No.1579 New Type of Nim | 
| コンテスト | |
| ユーザー |  H20 | 
| 提出日時 | 2021-07-02 22:16:50 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 217 bytes | 
| コンパイル時間 | 160 ms | 
| コンパイル使用メモリ | 82,176 KB | 
| 実行使用メモリ | 52,352 KB | 
| 最終ジャッジ日時 | 2024-06-29 11:55:07 | 
| 合計ジャッジ時間 | 2,616 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 11 WA * 20 | 
ソースコード
A,B = map(int, input().split())
A,B = max(A,B),min(A,B)
if (A==4 and B==3) or (A==2 and B==1):
    print('Q')
elif A==2 or B<=2:
    print('P')
else:
    if (A+B)%2==0:
        print('P')
    else:
        print('Q')
            
            
            
        