結果

問題 No.103 素因数ゲーム リターンズ
ユーザー shiomusubi496
提出日時 2020-09-10 22:44:39
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 352 bytes
コンパイル時間 1,759 ms
コンパイル使用メモリ 166,944 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-12-24 04:50:51
合計ジャッジ時間 2,578 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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