結果
| 問題 | No.2 素因数ゲーム |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-12-04 19:35:48 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 31 ms / 5,000 ms |
| コード長 | 301 bytes |
| コンパイル時間 | 536 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-12-04 19:35:51 |
| 合計ジャッジ時間 | 2,868 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 31 |
ソースコード
from collections import defaultdict
N = int(input())
res = defaultdict(int)
for i in range(2, int(N**0.5) + 1):
while N % i == 0 and N > 0:
N //= i
res[i] += 1
if N != 1:
res[N] += 1
flag = 0
for i in res:
flag ^= res[i]
if flag:
print("Alice")
else:
print("Bob")