結果
| 問題 |
No.2 素因数ゲーム
|
| コンテスト | |
| ユーザー |
e6i24v_kyopro
|
| 提出日時 | 2021-05-05 22:57:51 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 294 ms / 5,000 ms |
| コード長 | 635 bytes |
| コンパイル時間 | 1,596 ms |
| コンパイル使用メモリ | 174,780 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-13 15:22:57 |
| 合計ジャッジ時間 | 3,229 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 31 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
//const int MAX=INT_MAX;
//const ll MAX=100000000000;
//const int mod = 1000000007;
int main(){
int N;
cin>>N;
map<int,int> mp;
for(int i=2;i<=N;i++){
if(N%i!=0)continue;
while(N%i==0){
N=N/i;
mp[i]++;
}
}
if(N!=1){
mp[N]++;
}
int flag=0;
for(auto m:mp){
flag^=(m.second);
//cout<<m.first<<" "<<m.second<<" ";
}
if(flag){
cout<<"Alice"<<endl;
}else{
cout<<"Bob"<<endl;
}
}
e6i24v_kyopro