結果
| 問題 | No.2 素因数ゲーム |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-03-11 20:53:17 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 31 ms / 5,000 ms |
| コード長 | 367 bytes |
| コンパイル時間 | 225 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-09-16 00:45:23 |
| 合計ジャッジ時間 | 2,146 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 31 |
ソースコード
n = int(input())
A = []
cnt = 0
while n % 2 == 0:
cnt += 1
n //= 2
if cnt > 0:
A.append(cnt)
f = 3
while f * f <= n:
cnt = 0
while n % f == 0:
cnt += 1
n //= f
if cnt > 0:
A.append(cnt)
f += 2
if n != 1:
A.append(1)
num = 0
for ele in A:
num ^= ele
if num == 0:
print("Bob")
else:
print("Alice")