結果
| 問題 | No.2 素因数ゲーム |
| コンテスト | |
| ユーザー |
AAAR Salmon
|
| 提出日時 | 2021-05-22 00:32:46 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 53 ms / 5,000 ms |
| コード長 | 308 bytes |
| コンパイル時間 | 206 ms |
| コンパイル使用メモリ | 82,040 KB |
| 実行使用メモリ | 62,072 KB |
| 最終ジャッジ日時 | 2024-10-10 10:27:17 |
| 合計ジャッジ時間 | 2,881 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 31 |
ソースコード
from collections import defaultdict
from functools import reduce
from operator import xor
N = int(input())
pf = defaultdict(lambda: 0)
i = 2
while i * i <= N:
if N % i == 0:
while N % i == 0:
pf[i] += 1
N //= i
i += 1
if N != 1:
pf[N] += 1
print('Alice' if reduce(xor, pf.values()) else 'Bob')
AAAR Salmon