結果
| 問題 |
No.2 素因数ゲーム
|
| コンテスト | |
| ユーザー |
NullKara
|
| 提出日時 | 2020-11-23 10:21:46 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 389 bytes |
| コンパイル時間 | 2,002 ms |
| コンパイル使用メモリ | 167,028 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-23 17:21:58 |
| 合計ジャッジ時間 | 3,087 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 31 |
ソースコード
#include<bits/stdc++.h>
//#include<atcoder/all>
using namespace std;
//using namespace atcoder;
int main(){
int N;
cin>>N;
int r=sqrt(N)+2;
int xr=0;
for(int i=2;i<=r;i++){
int c=0;
while(N%i==0){
c++;
N/=i;
}
xr^=c;
}
if(N!=1) xr^=1;
if(xr==0) cout<<"Bob"<<endl;
else cout<<"Alice"<<endl;
}
NullKara