結果

問題 No.103 素因数ゲーム リターンズ
ユーザー 茅ヶ崎裕太
提出日時 2024-12-25 23:53:21
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 417 bytes
コンパイル時間 303 ms
コンパイル使用メモリ 82,036 KB
実行使用メモリ 57,444 KB
最終ジャッジ日時 2024-12-25 23:53:23
合計ジャッジ時間 2,501 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4 WA * 1
other AC * 16 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
M=list(map(int,input().split()))

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

g=0
for i in M:
    g^=len(prime_factorize(i))
if g:
    print("Alice")
else:
    print("Bob")
0