結果
問題 |
No.2 素因数ゲーム
|
ユーザー |
|
提出日時 | 2023-11-11 23:43:51 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 49 ms / 5,000 ms |
コード長 | 348 bytes |
コンパイル時間 | 269 ms |
コンパイル使用メモリ | 82,816 KB |
実行使用メモリ | 59,392 KB |
最終ジャッジ日時 | 2024-09-26 02:56:30 |
合計ジャッジ時間 | 2,712 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 31 |
ソースコード
from collections import defaultdict N = int(input()) factor = defaultdict(int) while N & 1 == 0: factor[2] += 1 N >>= 1 a = 3 while a * a <= N: while N % a == 0: factor[a] += 1 N //= a a += 2 if N != 1 : factor[N] += 1 ans = 0 for k in factor: ans ^= factor[k] if ans : print("Alice") else : print("Bob")