結果
| 問題 | No.103 素因数ゲーム リターンズ | 
| コンテスト | |
| ユーザー |  srup٩(๑`н´๑)۶ | 
| 提出日時 | 2016-09-14 09:38:50 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 5,000 ms | 
| コード長 | 406 bytes | 
| コンパイル時間 | 657 ms | 
| コンパイル使用メモリ | 53,468 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-11-17 05:52:54 | 
| 合計ジャッジ時間 | 1,408 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 5 | 
| other | AC * 20 | 
ソースコード
#include <iostream>
#include <cstdio>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<(n);i++)
int main(void){
	int n; cin >> n;
	int sum = 0;
	rep(i, n){
		int m; cin >> m;
		for (int p = 2; p <= m; ++p){
			int cnt = 0;
			while(m % p == 0){
				cnt++;
				m /= p;
			}
			sum ^= cnt % 3;
		}
	}
	if(sum == 0){
		printf("Bob\n");
	}else{
		printf("Alice\n");
	}
	return 0;
}
            
            
            
        