結果
| 問題 | No.2 素因数ゲーム |
| コンテスト | |
| ユーザー |
opqopq_
|
| 提出日時 | 2015-04-29 22:41:16 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 5,000 ms |
| コード長 | 332 bytes |
| コンパイル時間 | 992 ms |
| コンパイル使用メモリ | 65,756 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-26 11:10:04 |
| 合計ジャッジ時間 | 1,973 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 31 |
ソースコード
#include <iostream>
#include <map>
using namespace std;
int N;
int main() {
cin >> N;
map<int, int> m;
for (int i = 2; i * i <= N; i++) {
while (N % i == 0) {
m[i]++;
N /= i;
}
}
if (1 < N) m[N] = 1;
int x = 0;
for (auto& p : m) {
x ^= p.second;
}
cout << (x ? "Alice" : "Bob") << '\n';
return 0;
}
opqopq_