結果
| 問題 | No.103 素因数ゲーム リターンズ |
| コンテスト | |
| ユーザー |
tottoripaper
|
| 提出日時 | 2014-12-14 23:56:00 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 522 bytes |
| 記録 | |
| コンパイル時間 | 167 ms |
| コンパイル使用メモリ | 40,592 KB |
| 実行使用メモリ | 7,720 KB |
| 最終ジャッジ日時 | 2026-03-05 03:15:55 |
| 合計ジャッジ時間 | 999 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 5 |
| other | AC * 20 |
ソースコード
#include <cstdio>
int main(){
int N;
scanf("%d", &N);
int ex_or = 0;
for(int i=0;i<N;i++){
int n;
scanf("%d", &n);
for(int j=2;j*j<=n;j++){
int t = 0;
while(n % j == 0){
t += 1;
n /= j;
}
ex_or ^= t % 3;
}
if(n > 1){
ex_or ^= 1;
}
}
if(ex_or == 0){
puts("Bob");
}else{
puts("Alice");
}
}
tottoripaper