結果
| 問題 | No.2 素因数ゲーム |
| コンテスト | |
| ユーザー |
brthyyjp
|
| 提出日時 | 2021-03-27 18:16:29 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 39 ms / 5,000 ms |
| コード長 | 523 bytes |
| コンパイル時間 | 142 ms |
| コンパイル使用メモリ | 82,112 KB |
| 実行使用メモリ | 57,600 KB |
| 最終ジャッジ日時 | 2024-11-29 08:24:05 |
| 合計ジャッジ時間 | 2,289 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 31 |
ソースコード
n = int(input())
import math
def factorize(n):
d = {}
temp = int(math.sqrt(n))+1
for i in range(2, temp):
while n%i== 0:
n //= i
if i in d:
d[i] += 1
else:
d[i] = 1
if d == {}:
d[n] = 1
else:
if n in d:
d[n] += 1
elif n != 1:
d[n] =1
return d
d = factorize(n)
V = list(d.values())
#print(V)
t = 0
for v in V:
t ^= v
if t == 0:
print('Bob')
else:
print('Alice')
brthyyjp