結果

問題 No.1579 New Type of Nim
ユーザー kiyoshi0205
提出日時 2021-07-02 21:41:04
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 376 bytes
コンパイル時間 3,814 ms
コンパイル使用メモリ 230,020 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-23 05:17:08
合計ジャッジ時間 4,842 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 31
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
#include<atcoder/all>
using namespace atcoder;
using mint=modint1000000007;
long long p(long long n,long long r,long long m){
  if(r==0)return 1;
  if(r==1)return n%m;
  auto x=p(n,r%2,m);
  return p(n*n%m,r/2,m)*x%m;
}
long long A,B;
int main(){
  cin>>A>>B;
  if(A>B)swap(A,B);
  cout<<char('P'+(A%2==1&&(A==B||A+1==B)))<<endl;
}
0