結果

問題 No.2 素因数ゲーム
ユーザー ayame_pyayame_py
提出日時 2015-10-08 00:35:52
言語 Python2
(2.7.18)
結果
AC  
実行時間 14 ms / 5,000 ms
コード長 357 bytes
コンパイル時間 510 ms
コンパイル使用メモリ 6,592 KB
実行使用メモリ 6,388 KB
最終ジャッジ日時 2023-08-27 04:08:41
合計ジャッジ時間 2,292 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
6,032 KB
testcase_01 AC 12 ms
5,908 KB
testcase_02 AC 12 ms
5,976 KB
testcase_03 AC 12 ms
6,064 KB
testcase_04 AC 12 ms
5,932 KB
testcase_05 AC 12 ms
5,900 KB
testcase_06 AC 13 ms
6,156 KB
testcase_07 AC 12 ms
5,984 KB
testcase_08 AC 12 ms
6,152 KB
testcase_09 AC 14 ms
6,388 KB
testcase_10 AC 14 ms
6,328 KB
testcase_11 AC 14 ms
6,236 KB
testcase_12 AC 13 ms
6,156 KB
testcase_13 AC 14 ms
6,240 KB
testcase_14 AC 12 ms
6,120 KB
testcase_15 AC 13 ms
6,108 KB
testcase_16 AC 14 ms
6,192 KB
testcase_17 AC 13 ms
6,324 KB
testcase_18 AC 14 ms
6,252 KB
testcase_19 AC 13 ms
6,128 KB
testcase_20 AC 14 ms
6,176 KB
testcase_21 AC 14 ms
6,312 KB
testcase_22 AC 13 ms
6,296 KB
testcase_23 AC 13 ms
6,208 KB
testcase_24 AC 14 ms
6,240 KB
testcase_25 AC 14 ms
6,292 KB
testcase_26 AC 14 ms
6,176 KB
testcase_27 AC 13 ms
6,192 KB
testcase_28 AC 13 ms
6,264 KB
testcase_29 AC 13 ms
6,100 KB
testcase_30 AC 13 ms
6,160 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding:utf-8
import math
N=int(raw_input())
pf={}

#試し割り
dividedN = N
for i in range(2, int(math.sqrt(N))+2):
	if dividedN % i == 0: pf[i]=0
	while dividedN % i==0:
		dividedN/=i
		pf[i]+=1

if dividedN != 1: pf[dividedN]=1

pf = pf.values()
xor = pf[0]
for i in range(1, len(pf)):
	xor = xor ^ pf[i]

if xor != 0: print 'Alice'
else: print 'Bob'
0