結果
問題 |
No.2 素因数ゲーム
|
ユーザー |
|
提出日時 | 2021-07-02 09:23:03 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 36 ms / 5,000 ms |
コード長 | 300 bytes |
コンパイル時間 | 241 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-06-28 19:36:30 |
合計ジャッジ時間 | 2,252 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 31 |
ソースコード
from collections import defaultdict N = int(input()) so = defaultdict(int) m = N x = 2 while m > 1 and x < int(N**0.5)+10: while m%x==0: m //= x so[x] += 1 x += 1 if m > 1: so[m] += 1 f = 0 for v in so.values(): f ^= v if f: print("Alice") else: print("Bob")