結果
| 問題 | No.2 素因数ゲーム |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-12-23 21:51:11 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 318 ms / 5,000 ms |
| コード長 | 553 bytes |
| コンパイル時間 | 1,465 ms |
| コンパイル使用メモリ | 161,844 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-26 11:59:07 |
| 合計ジャッジ時間 | 3,353 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 31 |
ソースコード
#include <bits/stdc++.h>
#define REP(i, x, n) for(int i = x; i < n; i++)
#define rep(i,n) REP(i,0,n)
#define P(p) cout<<(p)<<endl;
#define PII pair<int,int>
typedef long long LL;
typedef long double LD;
typedef unsigned long long ULL;
using namespace std;
int main(){
int cnt=0,i,j=0,n;
vector<int> v;
cin >> n;
REP(i,2,n){
while(n%i == 0){
cnt++;
n=n/i;
}
if(cnt!=0){
v.push_back(cnt);
}
cnt=0;
}
if(n!=1) v.push_back(1);
rep(i,v.size()) j ^= v[i];
if(j) cout << "Alice" << endl;
else cout << "Bob" << endl;
return 0;
}