結果

問題 No.1579 New Type of Nim
ユーザー _umbrella_kasa
提出日時 2021-07-02 22:33:47
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 318 bytes
コンパイル時間 1,674 ms
コンパイル使用メモリ 166,008 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-29 12:25:28
合計ジャッジ時間 2,685 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 29 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
    int A,B;
    cin >> A >> B;
    A=min(A,B);
    B=max(A,B);
    if (A%2==0) {
        cout << "P" << endl;
    }
    else {
        if (B>=A+2) {
            cout << "P" << endl;
        }
        else {
            cout << "Q" << endl;
        }
    }
}
0