結果
問題 |
No.2 素因数ゲーム
|
ユーザー |
|
提出日時 | 2016-03-24 18:29:30 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 337 bytes |
コンパイル時間 | 413 ms |
コンパイル使用メモリ | 54,012 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-02 00:13:57 |
合計ジャッジ時間 | 1,248 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 29 WA * 2 |
ソースコード
#include <iostream> using namespace std; int main() { int n; cin >> n; int bit = 0; for (int i = 2; i * i <= n; i++) { int count = 0; while (n % i == 0) { n /= i; count++; } bit ^= count; } if (n != -1) bit ^= 1; if (bit == 0) { cout << "Bob" << endl; } else { cout << "Alice" << endl; } return 0; }