結果

問題 No.2 素因数ゲーム
ユーザー dn6049949dn6049949
提出日時 2022-04-15 22:22:08
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 91 ms / 5,000 ms
コード長 802 bytes
コンパイル時間 243 ms
コンパイル使用メモリ 87,252 KB
実行使用メモリ 76,852 KB
最終ジャッジ日時 2023-08-26 08:11:53
合計ジャッジ時間 4,670 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
71,556 KB
testcase_01 AC 80 ms
71,536 KB
testcase_02 AC 85 ms
71,472 KB
testcase_03 AC 85 ms
71,536 KB
testcase_04 AC 90 ms
71,636 KB
testcase_05 AC 87 ms
71,776 KB
testcase_06 AC 86 ms
71,520 KB
testcase_07 AC 86 ms
71,560 KB
testcase_08 AC 91 ms
76,696 KB
testcase_09 AC 86 ms
71,656 KB
testcase_10 AC 87 ms
71,560 KB
testcase_11 AC 86 ms
71,652 KB
testcase_12 AC 85 ms
71,804 KB
testcase_13 AC 84 ms
71,516 KB
testcase_14 AC 86 ms
71,564 KB
testcase_15 AC 88 ms
76,600 KB
testcase_16 AC 90 ms
76,624 KB
testcase_17 AC 87 ms
71,440 KB
testcase_18 AC 84 ms
71,612 KB
testcase_19 AC 91 ms
76,572 KB
testcase_20 AC 85 ms
76,548 KB
testcase_21 AC 89 ms
76,332 KB
testcase_22 AC 91 ms
76,852 KB
testcase_23 AC 89 ms
71,500 KB
testcase_24 AC 90 ms
76,608 KB
testcase_25 AC 89 ms
76,332 KB
testcase_26 AC 84 ms
71,564 KB
testcase_27 AC 85 ms
71,304 KB
testcase_28 AC 87 ms
71,500 KB
testcase_29 AC 87 ms
71,500 KB
testcase_30 AC 89 ms
76,792 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!usr/bin/env python3
from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations, accumulate
import sys
import math
import bisect
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def IR(n):
    return [I() for _ in range(n)]
def LIR(n):
    return [LI() for _ in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def main():
    def f(n):
        g = 0
        i = 2
        while i*i <= n:
            s = 0
            while n%i == 0:
                n //= i
                s += 1
            g ^= s
            i += 1
        if n > 1:
            g ^= 1

        return g == 0

    n = I()
    print(["Alice", "Bob"][f(n)])
    return


if __name__ == "__main__":
    main()
0