結果

問題 No.103 素因数ゲーム リターンズ
ユーザー s_shoheis_shohei
提出日時 2021-09-27 21:02:19
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 76 ms / 5,000 ms
コード長 492 bytes
コンパイル時間 252 ms
コンパイル使用メモリ 87,228 KB
実行使用メモリ 76,152 KB
最終ジャッジ日時 2023-09-20 22:29:09
合計ジャッジ時間 3,198 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,684 KB
testcase_01 AC 71 ms
71,780 KB
testcase_02 AC 72 ms
71,740 KB
testcase_03 AC 72 ms
71,624 KB
testcase_04 AC 75 ms
71,496 KB
testcase_05 AC 72 ms
71,712 KB
testcase_06 AC 71 ms
71,620 KB
testcase_07 AC 71 ms
71,792 KB
testcase_08 AC 72 ms
71,660 KB
testcase_09 AC 72 ms
71,896 KB
testcase_10 AC 72 ms
71,680 KB
testcase_11 AC 72 ms
71,432 KB
testcase_12 AC 74 ms
75,808 KB
testcase_13 AC 74 ms
75,664 KB
testcase_14 AC 74 ms
75,736 KB
testcase_15 AC 75 ms
75,784 KB
testcase_16 AC 70 ms
71,848 KB
testcase_17 AC 75 ms
75,720 KB
testcase_18 AC 73 ms
75,788 KB
testcase_19 AC 74 ms
75,552 KB
testcase_20 AC 74 ms
75,740 KB
testcase_21 AC 74 ms
75,668 KB
testcase_22 AC 73 ms
75,744 KB
testcase_23 AC 72 ms
75,700 KB
testcase_24 AC 74 ms
76,152 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int, input().split()))
def fact(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append(cnt)
    if temp!=1:
        arr.append(1)
    if arr==[]:
        arr.append(1)
    return arr

xor=0
for num in a:
    for e in fact(num):
        xor^= (e%3)
if xor==0:
    print("Bob")
else:
    print("Alice")
0