結果
| 問題 | No.1579 New Type of Nim | 
| コンテスト | |
| ユーザー |  c-yan | 
| 提出日時 | 2021-07-02 22:46:46 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 424 bytes | 
| コンパイル時間 | 100 ms | 
| コンパイル使用メモリ | 12,288 KB | 
| 実行使用メモリ | 10,752 KB | 
| 最終ジャッジ日時 | 2024-06-29 12:38:18 | 
| 合計ジャッジ時間 | 2,029 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 WA * 1 | 
| other | AC * 23 WA * 8 | 
ソースコード
A, B = map(int, input().split())
A, B = min(A, B), max(A, B)
if A == 1:
    if B == 1:
        print('Q')
    elif B % 2 == 0:
        print('Q')
    else:
        print('P')
elif A == 2:
    if B == 2:
        print('P')
    if B == 3:
        print('P')
    elif B % 2 == 0:
        print('P')
    else:
        print('Q')
elif A == 3:
    if B == 3:
        print('Q')
    else:
        print('P')
else:
    print('P')
            
            
            
        