結果

問題 No.103 素因数ゲーム リターンズ
ユーザー lllllll88938494lllllll88938494
提出日時 2023-05-06 20:30:54
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 92 ms / 5,000 ms
コード長 454 bytes
コンパイル時間 1,114 ms
コンパイル使用メモリ 87,184 KB
実行使用メモリ 77,944 KB
最終ジャッジ日時 2023-08-15 17:49:47
合計ジャッジ時間 5,007 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
72,228 KB
testcase_01 AC 78 ms
71,772 KB
testcase_02 AC 81 ms
72,132 KB
testcase_03 AC 77 ms
72,216 KB
testcase_04 AC 78 ms
72,168 KB
testcase_05 AC 80 ms
72,192 KB
testcase_06 AC 79 ms
71,892 KB
testcase_07 AC 82 ms
71,892 KB
testcase_08 AC 83 ms
72,160 KB
testcase_09 AC 82 ms
71,796 KB
testcase_10 AC 79 ms
71,972 KB
testcase_11 AC 77 ms
71,772 KB
testcase_12 AC 85 ms
77,060 KB
testcase_13 AC 83 ms
76,612 KB
testcase_14 AC 92 ms
77,944 KB
testcase_15 AC 86 ms
76,772 KB
testcase_16 AC 78 ms
71,864 KB
testcase_17 AC 86 ms
76,824 KB
testcase_18 AC 85 ms
76,988 KB
testcase_19 AC 84 ms
76,996 KB
testcase_20 AC 85 ms
76,868 KB
testcase_21 AC 85 ms
76,688 KB
testcase_22 AC 85 ms
76,772 KB
testcase_23 AC 85 ms
76,620 KB
testcase_24 AC 86 ms
77,084 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
a=list(map(int,input().split()))
from collections import defaultdict as df
def  p(n):
    t = df(int)
    for i in range(2, int(n**0.5)+1):
        while n % i == 0:
            t[i] += 1
            n //= i
    if n > 1:
        t[n] += 1
    return t

ap = []
ans = 0
for i in range(n):
    d=p(a[i])
    t = 0
    for j in d.values():
        t^=j%3
    ans ^= t

print('Bob' if ans == 0 else 'Alice')
        
    
    
"""
012012

"""
0