結果
| 問題 |
No.2 素因数ゲーム
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-01-07 11:16:45 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 5,000 ms |
| コード長 | 305 bytes |
| コンパイル時間 | 2,286 ms |
| コンパイル使用メモリ | 172,580 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-26 13:18:28 |
| 合計ジャッジ時間 | 3,533 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 31 |
ソースコード
#include <bits/stdc++.h>
#define rep(i,n)for(int i=0;i<(n);i++)
using namespace std;
typedef long long ll;
int main(){
ll n;cin>>n;
map<ll,ll>mp;
for(ll i=2;i*i<=n;i++){
while(n%i==0){
mp[i]++;
n/=i;
}
}
if(n!=1)mp[n]++;
ll ans=0;
for(auto p:mp)ans^=p.second;
puts(ans?"Alice":"Bob");
}