結果

問題 No.2 素因数ゲーム
ユーザー maninimanini
提出日時 2021-02-12 15:07:42
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 75 ms / 5,000 ms
コード長 566 bytes
コンパイル時間 820 ms
コンパイル使用メモリ 86,936 KB
実行使用メモリ 76,036 KB
最終ジャッジ日時 2023-09-26 14:02:34
合計ジャッジ時間 4,974 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,532 KB
testcase_01 AC 71 ms
71,636 KB
testcase_02 AC 71 ms
71,348 KB
testcase_03 AC 70 ms
71,640 KB
testcase_04 AC 71 ms
71,576 KB
testcase_05 AC 70 ms
71,644 KB
testcase_06 AC 70 ms
75,600 KB
testcase_07 AC 71 ms
75,680 KB
testcase_08 AC 71 ms
75,496 KB
testcase_09 AC 72 ms
75,748 KB
testcase_10 AC 72 ms
75,636 KB
testcase_11 AC 73 ms
75,504 KB
testcase_12 AC 74 ms
75,700 KB
testcase_13 AC 72 ms
76,036 KB
testcase_14 AC 72 ms
75,680 KB
testcase_15 AC 71 ms
75,636 KB
testcase_16 AC 71 ms
75,388 KB
testcase_17 AC 71 ms
75,644 KB
testcase_18 AC 72 ms
75,696 KB
testcase_19 AC 72 ms
75,432 KB
testcase_20 AC 70 ms
75,800 KB
testcase_21 AC 72 ms
75,700 KB
testcase_22 AC 71 ms
75,652 KB
testcase_23 AC 72 ms
75,432 KB
testcase_24 AC 72 ms
75,476 KB
testcase_25 AC 71 ms
75,632 KB
testcase_26 AC 72 ms
76,016 KB
testcase_27 AC 72 ms
75,680 KB
testcase_28 AC 75 ms
75,628 KB
testcase_29 AC 73 ms
75,812 KB
testcase_30 AC 73 ms
75,680 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding:UTF-8
import sys

MOD = 10 ** 9 + 7
INF = float('inf')

def factorization(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([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    # if arr==[]:
    #     arr.append([n, 1])

    return arr


N = int(input())    # 数字
nums = factorization(N)

c = 0
for n, k in nums:
    c ^= k

if c != 0:
    print("Alice")
else:
    print("Bob")
0