結果
| 問題 | No.2 素因数ゲーム | 
| コンテスト | |
| ユーザー |  buey_t | 
| 提出日時 | 2023-04-27 13:28:25 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 140 ms / 5,000 ms | 
| コード長 | 1,408 bytes | 
| コンパイル時間 | 626 ms | 
| コンパイル使用メモリ | 82,048 KB | 
| 実行使用メモリ | 85,248 KB | 
| 最終ジャッジ日時 | 2024-11-16 20:31:38 | 
| 合計ジャッジ時間 | 5,685 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 31 | 
ソースコード
from math import sqrt,sin,cos,tan,ceil,radians,floor,gcd,exp,log,log10,log2,factorial,fsum
from heapq import heapify, heappop, heappush
from bisect import bisect_left, bisect_right
from copy import deepcopy
import copy
import random
from random import randrange
from collections import deque,Counter,defaultdict
from itertools import permutations,combinations
from decimal import Decimal,ROUND_HALF_UP
#tmp = Decimal(mid).quantize(Decimal('0'), rounding=ROUND_HALF_UP)
from functools import lru_cache, reduce
#@lru_cache(maxsize=None)
from operator import add,sub,mul,xor,and_,or_,itemgetter
import sys
input = sys.stdin.readline
# .rstrip()
INF = 10**18
mod1 = 10**9+7
mod2 = 998244353
#DecimalならPython
#再帰ならPython!!!!!!!!!!!!!!!!!!!!!!!!!!
#[素因数, 何乗か]
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())
A = []
prime = factorization(N)
for p,e in prime:
    A.append(e)
x = A[0]
for i in range(1,len(A)):
    x ^= A[i]
if x == 0:
    print('Bob')
else:
    print('Alice')
            
            
            
        