結果
| 問題 | No.103 素因数ゲーム リターンズ | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2023-11-20 14:24:27 | 
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 3 ms / 5,000 ms | 
| コード長 | 283 bytes | 
| コンパイル時間 | 3,055 ms | 
| コンパイル使用メモリ | 243,540 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-09-26 06:38:57 | 
| 合計ジャッジ時間 | 3,655 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 5 | 
| other | AC * 20 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
int x,res(0); cin >> x;
while(x--){
  int n,m,r(0); cin >> n; m = sqrt(n);
  for (int i(2),t(0);i <= m;++i,t=0){
    for (;n%i==0;++t) n/=i;
    r^=t%3;
  }
  if (n>1) r^=1;
  res^=r;
}
cout << (res?"Alice":"Bob") << endl;
}
            
            
            
        