結果
| 問題 | No.2 素因数ゲーム |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-12-04 19:55:58 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 314 ms / 5,000 ms |
| コード長 | 355 bytes |
| 記録 | |
| コンパイル時間 | 237 ms |
| コンパイル使用メモリ | 85,108 KB |
| 実行使用メモリ | 59,372 KB |
| 最終ジャッジ日時 | 2026-05-24 16:25:27 |
| 合計ジャッジ時間 | 2,670 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 31 |
ソースコード
N = int(input())
i = 2
num = list()
while N>i:
# if N%i==0:
while N%i==0:
num.append(i)
N = N//i
i+=1
if N!=1:
num.append(N)
num_set = set(num)
num_am = list()
for i in num_set:
num_am.append(num.count(i))
ans = 0
for i in num_am:
ans^=i
# print(ans, i)
if ans == 0:
print("Bob")
else:
print("Alice")