結果

問題 No.2 素因数ゲーム
ユーザー mink1618033mink1618033
提出日時 2022-03-26 01:06:54
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 46 ms / 5,000 ms
コード長 484 bytes
コンパイル時間 154 ms
コンパイル使用メモリ 82,020 KB
実行使用メモリ 60,052 KB
最終ジャッジ日時 2024-04-22 10:24:30
合計ジャッジ時間 2,484 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
54,476 KB
testcase_01 AC 43 ms
55,444 KB
testcase_02 AC 44 ms
54,932 KB
testcase_03 AC 42 ms
54,268 KB
testcase_04 AC 43 ms
54,616 KB
testcase_05 AC 43 ms
55,324 KB
testcase_06 AC 42 ms
55,120 KB
testcase_07 AC 43 ms
54,040 KB
testcase_08 AC 43 ms
55,492 KB
testcase_09 AC 43 ms
54,812 KB
testcase_10 AC 43 ms
54,068 KB
testcase_11 AC 43 ms
53,940 KB
testcase_12 AC 43 ms
54,380 KB
testcase_13 AC 44 ms
54,552 KB
testcase_14 AC 44 ms
54,064 KB
testcase_15 AC 45 ms
59,916 KB
testcase_16 AC 43 ms
54,932 KB
testcase_17 AC 43 ms
54,812 KB
testcase_18 AC 43 ms
54,288 KB
testcase_19 AC 46 ms
59,104 KB
testcase_20 AC 46 ms
60,052 KB
testcase_21 AC 46 ms
59,596 KB
testcase_22 AC 42 ms
54,864 KB
testcase_23 AC 43 ms
53,628 KB
testcase_24 AC 44 ms
54,148 KB
testcase_25 AC 43 ms
55,456 KB
testcase_26 AC 43 ms
53,688 KB
testcase_27 AC 43 ms
54,460 KB
testcase_28 AC 43 ms
53,824 KB
testcase_29 AC 42 ms
53,880 KB
testcase_30 AC 45 ms
58,772 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

n = int(input())

from collections import Counter
c = Counter(prime_factorize(n))
li = []
for key in c:
    li.append(c[key])
cri = 0
for i in li:
    cri^=i
if cri==0:
    print("Bob")
else:
    print("Alice")
0