結果
問題 | No.2 素因数ゲーム |
ユーザー |
![]() |
提出日時 | 2018-03-30 00:26:24 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 323 ms / 5,000 ms |
コード長 | 244 bytes |
コンパイル時間 | 1,573 ms |
コンパイル使用メモリ | 157,408 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-26 13:29:17 |
合計ジャッジ時間 | 3,219 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 31 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int s = 0; for (int i = 2;i <= n;i++) { int c = 0; while (n%i == 0) { n /= i; c++; } s ^= c; } cout << (s ? "Alice" : "Bob") << endl; return 0; }