結果
問題 |
No.2 素因数ゲーム
|
ユーザー |
![]() |
提出日時 | 2024-09-03 21:41:09 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 46 ms / 5,000 ms |
コード長 | 392 bytes |
コンパイル時間 | 370 ms |
コンパイル使用メモリ | 82,256 KB |
実行使用メモリ | 60,428 KB |
最終ジャッジ日時 | 2024-09-03 21:41:12 |
合計ジャッジ時間 | 3,293 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 31 |
ソースコード
from collections.abc import Iterator from collections import Counter def factorize(n: int) -> Iterator[int]: p = 2 while p * p <= n: while n % p == 0: yield p n //= p p += 1 if n > 1: yield n N = int(input()) ans = 0 for v in Counter(factorize(N)).values(): ans ^= v if ans == 0: print('Bob') else: print('Alice')