結果

問題 No.2 素因数ゲーム
ユーザー terasaterasa
提出日時 2022-11-20 12:31:27
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 65 ms / 5,000 ms
コード長 862 bytes
コンパイル時間 170 ms
コンパイル使用メモリ 81,632 KB
実行使用メモリ 68,288 KB
最終ジャッジ日時 2023-10-21 11:53:20
合計ジャッジ時間 3,420 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
68,088 KB
testcase_01 AC 55 ms
68,088 KB
testcase_02 AC 61 ms
68,088 KB
testcase_03 AC 58 ms
68,088 KB
testcase_04 AC 56 ms
68,088 KB
testcase_05 AC 56 ms
68,088 KB
testcase_06 AC 59 ms
68,288 KB
testcase_07 AC 61 ms
68,288 KB
testcase_08 AC 58 ms
68,288 KB
testcase_09 AC 60 ms
68,288 KB
testcase_10 AC 62 ms
68,288 KB
testcase_11 AC 61 ms
68,288 KB
testcase_12 AC 61 ms
68,288 KB
testcase_13 AC 61 ms
68,288 KB
testcase_14 AC 58 ms
68,288 KB
testcase_15 AC 61 ms
68,288 KB
testcase_16 AC 59 ms
68,288 KB
testcase_17 AC 58 ms
68,288 KB
testcase_18 AC 59 ms
68,288 KB
testcase_19 AC 58 ms
68,288 KB
testcase_20 AC 61 ms
68,288 KB
testcase_21 AC 59 ms
68,288 KB
testcase_22 AC 57 ms
68,288 KB
testcase_23 AC 60 ms
68,288 KB
testcase_24 AC 59 ms
68,288 KB
testcase_25 AC 59 ms
68,288 KB
testcase_26 AC 59 ms
68,288 KB
testcase_27 AC 56 ms
68,288 KB
testcase_28 AC 60 ms
68,288 KB
testcase_29 AC 61 ms
68,288 KB
testcase_30 AC 65 ms
68,288 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from typing import List, Tuple, Optional
import sys
import itertools
import heapq
import bisect
import math
from collections import deque, defaultdict
from functools import lru_cache, cmp_to_key

input = sys.stdin.readline

if __file__ != 'prog.py':
    sys.setrecursionlimit(10 ** 6)


def readints(): return map(int, input().split())
def readlist(): return list(readints())
def readstr(): return input()[:-1]


def factorize(n) -> List[int]:
    """return prime factors of given integer"""
    f = []
    m = n
    for i in range(2, n + 1):
        if i * i > n:
            break
        while m % i == 0:
            f.append(i)
            m //= i
    if m > 1:
        f.append(m)
    return f


N = int(input())
cnt = defaultdict(int)
for f in factorize(N):
    cnt[f] += 1
acc = 0
for v in cnt.values():
    acc ^= v
print('Alice' if acc > 0 else 'Bob')
0