結果

問題 No.2 素因数ゲーム
ユーザー GOTKAKOGOTKAKO
提出日時 2024-05-06 23:29:11
言語 C++17(gcc12)
(gcc 12.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 392 bytes
コンパイル時間 2,208 ms
コンパイル使用メモリ 199,936 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-29 10:20:07
合計ジャッジ時間 2,790 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 31
権限があれば一括ダウンロードができます

ソースコード

diff #

#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; 
}
0