結果

問題 No.1579 New Type of Nim
ユーザー shiomusubi496
提出日時 2021-07-02 21:55:43
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 22 ms / 2,000 ms
コード長 182 bytes
コンパイル時間 1,511 ms
コンパイル使用メモリ 192,520 KB
最終ジャッジ日時 2025-01-22 15:57:17
ジャッジサーバーID
(参考情報)
judge4 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 31
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
#define int long long
using namespace std;
signed main(){
  int A,B; cin>>A>>B;
  if(abs(A-B)>1)puts("P");
  else if(min(A,B)%2)puts("Q");
  else puts("P");
}
0