結果

問題 No.1579 New Type of Nim
ユーザー tktk_snsn
提出日時 2021-07-02 23:11:38
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 314 bytes
コンパイル時間 86 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-06-29 13:00:09
合計ジャッジ時間 2,064 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 24 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    A, B = map(int, input().split())
    A, B = min(A, B), max(A, B)

    if (A, B) == (1, 1):
        return False
    if (A, B) == (1, 2):
        return False
    if A == 1:
        return True
    if A % 2 == 0:
        return True
    return False


if main():
    print("P")
else:
    print("Q")
0