結果
| 問題 | No.1579 New Type of Nim | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2022-01-10 22:02:49 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 343 bytes | 
| コンパイル時間 | 157 ms | 
| コンパイル使用メモリ | 82,340 KB | 
| 実行使用メモリ | 53,984 KB | 
| 最終ジャッジ日時 | 2024-11-14 11:10:29 | 
| 合計ジャッジ時間 | 2,401 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 WA * 2 | 
| other | AC * 23 WA * 8 | 
ソースコード
A,B = map(int,input().split())
P = 'P'
Q = 'Q'
import sys
if A == 0:
    if B <= 1:
        print(Q)
        exit()
    else:
        print(P)
        exit()
if A == 1:
    if B == 1:
        print(Q)
        exit()
    else:
        print(P)
        exit()
if B <= 2:
    print(P)
    exit()
if min(A,B) == 2:
    print(Q)
else:
    print(P)
            
            
            
        