結果
問題 |
No.2 素因数ゲーム
|
ユーザー |
![]() |
提出日時 | 2022-04-15 22:22:08 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 48 ms / 5,000 ms |
コード長 | 802 bytes |
コンパイル時間 | 343 ms |
コンパイル使用メモリ | 82,220 KB |
実行使用メモリ | 60,160 KB |
最終ジャッジ日時 | 2024-12-25 01:12:18 |
合計ジャッジ時間 | 2,889 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 31 |
ソースコード
#!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()