結果
| 問題 |
No.2 素因数ゲーム
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-10-31 17:17:32 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 277 ms / 5,000 ms |
| コード長 | 476 bytes |
| コンパイル時間 | 3,178 ms |
| コンパイル使用メモリ | 244,064 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-25 17:41:39 |
| 合計ジャッジ時間 | 4,124 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 31 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
#define ALL(a) a.begin(), a.end()
#define RALL(a) a.rbegin(), a.rend()
using ll = long long;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int N; cin >> N;
int ans = 0;
for(int i = 2; i <= N; i++)
{
int cnt = 0;
for(cnt = 0; N % i == 0;)
{
N /= i;
cnt++;
}
ans ^= cnt;
}
cout << (ans ? "Alice" : "Bob") << "\n";
}