結果

問題 No.103 素因数ゲーム リターンズ
ユーザー msm1993msm1993
提出日時 2020-11-18 16:04:22
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 352 bytes
コンパイル時間 1,974 ms
コンパイル使用メモリ 166,772 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-23 09:04:01
合計ジャッジ時間 3,047 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 5
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
#define int long long
using namespace std;
signed main(){
    int N,ans=0;
    cin>>N;
    while(N--){
        int M;
        cin>>M;
        for(int i=2;i*i<=M;i++){
            int cnt=0;
            for(;M%i==0;M/=i)cnt++;
            ans^=cnt%3;
        }
        if(M!=1)ans^=1;
    }
    cout<<(ans?"Alice":"Bob")<<endl;
}
0