結果

問題 No.103 素因数ゲーム リターンズ
ユーザー ayaoniayaoni
提出日時 2020-12-05 11:47:02
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 86 ms / 5,000 ms
コード長 821 bytes
コンパイル時間 865 ms
コンパイル使用メモリ 87,020 KB
実行使用メモリ 76,892 KB
最終ジャッジ日時 2023-10-13 21:20:31
合計ジャッジ時間 4,375 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,632 KB
testcase_01 AC 74 ms
71,896 KB
testcase_02 AC 75 ms
71,484 KB
testcase_03 AC 75 ms
71,824 KB
testcase_04 AC 74 ms
71,636 KB
testcase_05 AC 76 ms
71,476 KB
testcase_06 AC 76 ms
71,704 KB
testcase_07 AC 78 ms
71,928 KB
testcase_08 AC 74 ms
71,600 KB
testcase_09 AC 76 ms
71,520 KB
testcase_10 AC 80 ms
71,924 KB
testcase_11 AC 79 ms
71,784 KB
testcase_12 AC 83 ms
76,892 KB
testcase_13 AC 83 ms
76,668 KB
testcase_14 AC 86 ms
76,388 KB
testcase_15 AC 84 ms
76,756 KB
testcase_16 AC 76 ms
71,400 KB
testcase_17 AC 80 ms
76,432 KB
testcase_18 AC 81 ms
76,632 KB
testcase_19 AC 81 ms
76,592 KB
testcase_20 AC 80 ms
76,528 KB
testcase_21 AC 83 ms
76,684 KB
testcase_22 AC 81 ms
76,704 KB
testcase_23 AC 80 ms
76,668 KB
testcase_24 AC 83 ms
76,680 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

sys.setrecursionlimit(10**7)
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
def LS2(): return list(sys.stdin.readline().rstrip())


N = I()
M = LI()

X = []
for i in range(N):
    m = M[i]
    for j in range(2,int(m**.5)+1):
        r = 0
        if m % j == 0:
            while m % j == 0:
                r += 1
                m //= j
        X.append(r)
    if m != 1:
        X.append(1)

X = [x % 3 for x in X]
a = 0
for x in X:
    a ^= x

if a == 0:
    print('Bob')
else:
    print('Alice')
0