結果

問題 No.2 素因数ゲーム
ユーザー tcltktcltk
提出日時 2021-06-06 04:18:58
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 217 ms / 5,000 ms
コード長 746 bytes
コンパイル時間 383 ms
コンパイル使用メモリ 87,140 KB
実行使用メモリ 90,004 KB
最終ジャッジ日時 2023-08-14 10:27:55
合計ジャッジ時間 8,613 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 213 ms
89,492 KB
testcase_01 AC 204 ms
89,368 KB
testcase_02 AC 208 ms
89,496 KB
testcase_03 AC 208 ms
89,472 KB
testcase_04 AC 207 ms
89,428 KB
testcase_05 AC 207 ms
89,424 KB
testcase_06 AC 208 ms
89,772 KB
testcase_07 AC 194 ms
81,144 KB
testcase_08 AC 205 ms
89,648 KB
testcase_09 AC 214 ms
89,880 KB
testcase_10 AC 215 ms
89,768 KB
testcase_11 AC 208 ms
89,776 KB
testcase_12 AC 207 ms
89,744 KB
testcase_13 AC 214 ms
89,908 KB
testcase_14 AC 210 ms
89,832 KB
testcase_15 AC 209 ms
89,912 KB
testcase_16 AC 209 ms
89,920 KB
testcase_17 AC 205 ms
89,900 KB
testcase_18 AC 212 ms
89,768 KB
testcase_19 AC 216 ms
90,004 KB
testcase_20 AC 212 ms
89,772 KB
testcase_21 AC 212 ms
89,916 KB
testcase_22 AC 210 ms
89,672 KB
testcase_23 AC 216 ms
89,944 KB
testcase_24 AC 214 ms
89,792 KB
testcase_25 AC 211 ms
89,560 KB
testcase_26 AC 217 ms
89,652 KB
testcase_27 AC 209 ms
89,636 KB
testcase_28 AC 209 ms
89,860 KB
testcase_29 AC 209 ms
89,632 KB
testcase_30 AC 208 ms
89,748 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
# from typing import *

import sys
import io
import math
import collections
import decimal
import itertools
import bisect
import heapq


def input():
    return sys.stdin.readline()[:-1]


# sys.setrecursionlimit(1000000)

# _INPUT = """# paste here...
# """
# sys.stdin = io.StringIO(_INPUT)


def factorize(N):
    i = 2
    ans = dict()
    n = N
    while i * i <= N:
        while n % i == 0:
            n = n // i
            if i in ans:
                ans[i] += 1
            else:
                ans[i] = 1
        i += 1
    if n != 1:
        ans[n] = 1
    return list(ans.items())

N = int(input())
fac = factorize(N)

g = 0
for p, e in fac:
    g ^= e

if g == 0:
    print('Bob')
else:
    print('Alice')
0