結果
問題 |
No.2 素因数ゲーム
|
ユーザー |
|
提出日時 | 2021-11-04 11:44:14 |
言語 | C++17(clang) (17.0.6 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 389 bytes |
コンパイル時間 | 2,039 ms |
コンパイル使用メモリ | 163,648 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-14 09:12:25 |
合計ジャッジ時間 | 3,167 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 31 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int N; cin >> N; int a = 0; for(int i=2;i*i<=N;++i) { int c = 0; while(N%i == 0) { N /= i; ++c; } a ^= c; } if(N != 1) a ^= 1; if(a) cout << "Alice" << endl; else cout << "Bob" << endl; }