結果

問題 No.2 素因数ゲーム
ユーザー もちふわゆるゆるもちふわゆるゆる
提出日時 2023-04-14 17:23:47
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 44 ms / 5,000 ms
コード長 504 bytes
コンパイル時間 477 ms
コンパイル使用メモリ 82,424 KB
実行使用メモリ 59,128 KB
最終ジャッジ日時 2024-04-18 15:17:55
合計ジャッジ時間 2,658 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
52,004 KB
testcase_01 AC 38 ms
53,480 KB
testcase_02 AC 39 ms
53,236 KB
testcase_03 AC 38 ms
52,888 KB
testcase_04 AC 38 ms
52,696 KB
testcase_05 AC 44 ms
53,944 KB
testcase_06 AC 39 ms
52,824 KB
testcase_07 AC 38 ms
52,556 KB
testcase_08 AC 41 ms
58,276 KB
testcase_09 AC 39 ms
52,684 KB
testcase_10 AC 39 ms
52,668 KB
testcase_11 AC 39 ms
52,260 KB
testcase_12 AC 39 ms
52,140 KB
testcase_13 AC 38 ms
53,500 KB
testcase_14 AC 38 ms
51,692 KB
testcase_15 AC 42 ms
59,128 KB
testcase_16 AC 41 ms
57,912 KB
testcase_17 AC 39 ms
52,800 KB
testcase_18 AC 38 ms
52,664 KB
testcase_19 AC 42 ms
58,444 KB
testcase_20 AC 42 ms
57,960 KB
testcase_21 AC 41 ms
58,484 KB
testcase_22 AC 42 ms
57,984 KB
testcase_23 AC 39 ms
52,216 KB
testcase_24 AC 41 ms
58,004 KB
testcase_25 AC 42 ms
58,740 KB
testcase_26 AC 39 ms
54,044 KB
testcase_27 AC 39 ms
52,884 KB
testcase_28 AC 39 ms
53,660 KB
testcase_29 AC 40 ms
51,944 KB
testcase_30 AC 42 ms
58,532 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys, math
input = lambda: sys.stdin.readline()[:-1]
def MI(): return map(int, input().split())
inf = 10**18

n, = MI()

# 素因数分解√n
def prime_fac(n):
    res = []
    x = n
    y = 2
    while y*y <= x:
        ex = 0
        while x % y == 0:
            ex += 1
            x //= y
        if ex > 0: res.append((y, ex))
        y += 1
    if x > 1: res.append((x, 1))
    return res

n_prime = prime_fac(n)
ans = 0
for i, c in n_prime:
    ans ^= c
print('Alice' if ans!=0 else 'Bob')
0