結果
| 問題 | No.2 素因数ゲーム |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-02-05 12:28:03 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 40 ms / 5,000 ms |
| コード長 | 304 bytes |
| コンパイル時間 | 190 ms |
| コンパイル使用メモリ | 82,228 KB |
| 実行使用メモリ | 58,368 KB |
| 最終ジャッジ日時 | 2024-07-04 02:42:01 |
| 合計ジャッジ時間 | 2,362 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 31 |
ソースコード
import math
n = int(input())
cnt = {}
cur = n
for x in range(2, int(math.sqrt(n)) + 1):
if cur % x == 0:
cnt[x] = 0
while cur % x == 0:
cnt[x] += 1
cur //= x
if cur > 1:
cnt[cur] = 1
ans = 0
for v in cnt.values():
ans ^= v
if ans == 0:
print("Bob")
else:
print("Alice")