結果
| 問題 | No.2 素因数ゲーム |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-12-04 19:55:58 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 1,339 ms / 5,000 ms |
| コード長 | 355 bytes |
| コンパイル時間 | 469 ms |
| コンパイル使用メモリ | 82,432 KB |
| 実行使用メモリ | 57,728 KB |
| 最終ジャッジ日時 | 2024-12-04 19:56:04 |
| 合計ジャッジ時間 | 5,694 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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")