結果

問題 No.2 素因数ゲーム
ユーザー penguin8331penguin8331
提出日時 2023-01-06 17:05:08
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 2,047 bytes
コンパイル時間 10,768 ms
コンパイル使用メモリ 429,120 KB
実行使用メモリ 4,332 KB
最終ジャッジ日時 2023-08-20 10:44:08
合計ジャッジ時間 12,119 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,332 KB
testcase_01 AC 1 ms
4,328 KB
testcase_02 AC 2 ms
4,332 KB
testcase_03 AC 2 ms
4,332 KB
testcase_04 AC 2 ms
4,328 KB
testcase_05 AC 1 ms
4,332 KB
testcase_06 AC 1 ms
4,328 KB
testcase_07 AC 1 ms
4,328 KB
testcase_08 AC 1 ms
4,332 KB
testcase_09 AC 2 ms
4,328 KB
testcase_10 AC 2 ms
4,332 KB
testcase_11 AC 2 ms
4,332 KB
testcase_12 AC 2 ms
4,328 KB
testcase_13 AC 2 ms
4,328 KB
testcase_14 AC 1 ms
4,328 KB
testcase_15 AC 1 ms
4,332 KB
testcase_16 AC 1 ms
4,328 KB
testcase_17 AC 2 ms
4,328 KB
testcase_18 AC 2 ms
4,328 KB
testcase_19 AC 1 ms
4,328 KB
testcase_20 AC 2 ms
4,332 KB
testcase_21 AC 1 ms
4,328 KB
testcase_22 AC 1 ms
4,332 KB
testcase_23 AC 2 ms
4,332 KB
testcase_24 AC 1 ms
4,332 KB
testcase_25 AC 1 ms
4,328 KB
testcase_26 AC 1 ms
4,328 KB
testcase_27 AC 2 ms
4,328 KB
testcase_28 AC 1 ms
4,328 KB
testcase_29 AC 1 ms
4,332 KB
testcase_30 AC 2 ms
4,328 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#pragma region KCLC
// #pragma GCC target("avx2")
// #pragma GCC optimize("O3")
// #pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
#include <ext/rope>
using __gnu_cxx::rope;
#include <boost/multiprecision/cpp_dec_float.hpp>
#include <boost/multiprecision/cpp_int.hpp>
using Bint = boost::multiprecision::cpp_int;
using Real = boost::multiprecision::number<boost::multiprecision::cpp_dec_float<1024>>;
using ll = long long;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define elif else if
#define updiv(N, X) ((N + X - 1) / X)
#define sigma(a, b) ((a + b) * (b - a + 1) / 2)
#ifdef LOCAL
#include "debug.hpp"
#else
#define debug(...)
#endif
struct fast_ios {
    fast_ios() {
        cin.tie(nullptr);
        ios::sync_with_stdio(false);
        cout << fixed << setprecision(15);
    };
} fast_ios_;
template <typename T>
inline bool chmax(T& a, T b) { return ((a < b) ? (a = b, true) : (false)); }
template <typename T>
inline bool chmin(T& a, T b) { return ((a > b) ? (a = b, true) : (false)); }
#pragma endregion KCLC
//----------------------------------------------------------------------------
constexpr int inf = 1 << 30;
constexpr ll INF = 1LL << 60;
constexpr int dx[] = {1, 0, -1, 0, 1, -1, 1, -1};
constexpr int dy[] = {0, 1, 0, -1, 1, 1, -1, -1};
constexpr int mod = 998244353;
constexpr int MOD = 1e9 + 7;

map<long long, int> prime_factorize(long long n) {
    map<long long, int> res;
    for (long long p = 2; p * p <= n; ++p) {
        if (n % p != 0) continue;
        int num = 0;
        while (n % p == 0) {
            ++num;
            n /= p;
        }
        res[p] = num;
    }
    if (n != 1) res[n] = 1;
    return res;
}
int main() {
    int N;
    cin>>N;
    auto a=prime_factorize(N);
    int sum=0;
    for(const auto &i:a){
        sum=sum^i.second;
    }
    cout<<(sum==0? "Bob":"Alice")<<endl;
}
0