結果
| 問題 | No.2 素因数ゲーム |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-06-05 17:48:30 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 1,681 bytes |
| コンパイル時間 | 3,620 ms |
| コンパイル使用メモリ | 183,072 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-23 11:08:00 |
| 合計ジャッジ時間 | 3,809 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 31 |
ソースコード
#pragma GCC optimize("03,unroll-loops")
#pragma GCC target("avx,popcnt,sse4,abm")
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
#define ORENOOSHIKYOUMOKAWAIII ios::sync_with_stdio(0), cin.tie(0)
#define F first
#define S second
template<class T> bool chmin(T &a, T b){return (a>b)?a=b, true:false;}
template<class T> bool chmax(T &a, T b){return (a<b)?a=b, true:false;}
template<class T> T fpow(T x, ll k){T res=1;while(k){if (k&1) res=res*x;x=x*x, k>>=1;}return res;}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int get_rand(int l, int r){return uniform_int_distribution<int>(l, r)(rng);}
const double eps=1e-9;
const int IINF=1e9+7;
const ll LINF=1e18+5;
const int MOD1=998244353, MOD2=1e9+7;
template <class T> istream& operator>> (istream& cin, pair<T, T>& tmp){cin >> tmp.F >> tmp.S;return cin;}
template <class T> istream& operator>> (istream& cin, vector<T>& tmp){for(auto &v:tmp) cin >> v;return cin;}
template <class T> ostream& operator<< (ostream& cout, pair<T, T>& tmp){cout << tmp.F << ' ' << tmp.S;return cout;}
template <class T> ostream& operator<< (ostream& cout, vector<T>& tmp){for(auto v:tmp) cout << v << ' ';return cout;}
void solve(){
int n;
cin >> n;
int m=sqrt(n)+1;
int ans=0;
for(int i=2;i<=m;i++){
int cnt=0;
while(n%i==0){
cnt++;
n/=i;
}
ans^=cnt;
}
if (n!=1) ans^=1;
cout << (ans?"Alice\n":"Bob\n");
}
int main(){
ORENOOSHIKYOUMOKAWAIII;
int _t=1;
//cin >> _t;
while(_t--) solve();
}