結果
| 問題 | No.2 素因数ゲーム | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2021-07-20 16:26:03 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 32 ms / 5,000 ms | 
| コード長 | 301 bytes | 
| コンパイル時間 | 79 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 10,880 KB | 
| 最終ジャッジ日時 | 2024-07-17 13:43:44 | 
| 合計ジャッジ時間 | 2,004 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 31 | 
ソースコード
from math import sqrt
from collections import defaultdict
n = int(input())
d = defaultdict(int)
for i in range(2,int(sqrt(n))+1):
    while n % i == 0:
        d[i] += 1
        n //= i
if n > 1:
    d[n] += 1
nim = 0
for i in d.values():
    nim ^= i
if nim:
    print('Alice')
else:
    print('Bob')
            
            
            
        