結果
問題 |
No.2 素因数ゲーム
|
ユーザー |
![]() |
提出日時 | 2017-05-14 20:30:39 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 416 bytes |
コンパイル時間 | 1,497 ms |
コンパイル使用メモリ | 157,416 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-26 13:00:30 |
合計ジャッジ時間 | 2,554 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 31 |
ソースコード
#include"bits/stdc++.h" //#include<bits/stdc++.h> using namespace std; #define print(x) cout<<x<<endl; #define rep(i,a,b) for(int i=a;i<b;i++) typedef long long ll; const ll mod = LLONG_MAX; int main() { int n,ans=0; cin >> n; for (int i = 2; i*i <= n; i++) { int count = 0; while (n%i == 0) { count++; n /= i; } ans ^= count; } if (n != 1)ans ^= 1; print((ans ? "Alice" : "Bob")); return 0; }