結果
問題 |
No.2 素因数ゲーム
|
ユーザー |
|
提出日時 | 2018-07-30 18:22:01 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1,042 ms / 5,000 ms |
コード長 | 481 bytes |
コンパイル時間 | 1,079 ms |
コンパイル使用メモリ | 63,964 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-26 13:33:53 |
合計ジャッジ時間 | 4,730 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 31 |
ソースコード
#include <iostream> #include <complex> #include <vector> using namespace std; #define FOR(i,a,b) for(int i=(a); i<(b); i++) #define ll long long int int main(){ ll N; cin >> N; int bitxor = 0; FOR(i, 2, N + 1){ int count = 0; while (N % i == 0){ N /= i; count++; } bitxor ^= count; if (N == 1) break; } if (bitxor) cout << "Alice" << endl; else cout << "Bob" << endl; return 0; }