結果

問題 No.2 素因数ゲーム
ユーザー buey_tbuey_t
提出日時 2023-04-27 13:28:25
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 224 ms / 5,000 ms
コード長 1,408 bytes
コンパイル時間 274 ms
コンパイル使用メモリ 87,316 KB
実行使用メモリ 83,252 KB
最終ジャッジ日時 2023-08-10 14:01:45
合計ジャッジ時間 8,893 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 220 ms
82,812 KB
testcase_01 AC 221 ms
82,832 KB
testcase_02 AC 220 ms
82,848 KB
testcase_03 AC 218 ms
82,604 KB
testcase_04 AC 224 ms
82,792 KB
testcase_05 AC 224 ms
82,560 KB
testcase_06 AC 216 ms
82,712 KB
testcase_07 AC 222 ms
82,960 KB
testcase_08 AC 213 ms
83,012 KB
testcase_09 AC 213 ms
83,036 KB
testcase_10 AC 214 ms
82,928 KB
testcase_11 AC 218 ms
83,196 KB
testcase_12 AC 217 ms
82,876 KB
testcase_13 AC 215 ms
83,020 KB
testcase_14 AC 214 ms
82,836 KB
testcase_15 AC 212 ms
83,100 KB
testcase_16 AC 214 ms
82,840 KB
testcase_17 AC 212 ms
82,924 KB
testcase_18 AC 209 ms
82,852 KB
testcase_19 AC 220 ms
83,004 KB
testcase_20 AC 211 ms
82,896 KB
testcase_21 AC 214 ms
82,848 KB
testcase_22 AC 214 ms
82,724 KB
testcase_23 AC 214 ms
83,224 KB
testcase_24 AC 220 ms
82,892 KB
testcase_25 AC 214 ms
83,252 KB
testcase_26 AC 215 ms
82,880 KB
testcase_27 AC 212 ms
82,808 KB
testcase_28 AC 216 ms
82,972 KB
testcase_29 AC 210 ms
82,868 KB
testcase_30 AC 217 ms
83,008 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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')






















0