結果
| 問題 | No.2 素因数ゲーム | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2024-05-06 23:29:11 | 
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 5,000 ms | 
| コード長 | 392 bytes | 
| コンパイル時間 | 1,871 ms | 
| コンパイル使用メモリ | 193,452 KB | 
| 最終ジャッジ日時 | 2025-02-21 11:28:38 | 
| ジャッジサーバーID (参考情報) | judge5 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 31 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    int N; cin >> N;
    int Xor = 0;
    for(int i=2; i*i<=N; i++){
        if(N%i) continue;
        int e = 0;
        while(N%i == 0) N /= i,e++;
        Xor ^= e;
    }
    if(N != 1) Xor ^= 1;
    if(Xor) cout << "Alice" << endl;
    else cout << "Bob" << endl; 
}
            
            
            
        