結果
| 問題 |
No.103 素因数ゲーム リターンズ
|
| コンテスト | |
| ユーザー |
kyo1
|
| 提出日時 | 2022-06-30 15:52:40 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 489 bytes |
| コンパイル時間 | 1,936 ms |
| コンパイル使用メモリ | 193,044 KB |
| 最終ジャッジ日時 | 2025-01-30 01:55:37 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 WA * 2 |
| other | AC * 15 WA * 5 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int N;
cin >> N;
vector<int> M(N);
for (auto&& e : M) {
cin >> e;
}
int res = 0;
for (const auto& e : M) {
int m = e;
for (int i = 2; i * i <= m; i++) {
int c = 0;
while (m % i == 0) {
m /= i;
c++;
}
res ^= c % 2;
}
if (m > 1) res ^= 1;
}
cout << (res == 0 ? "Bob" : "Alice") << '\n';
return 0;
}
kyo1