結果

問題 No.312 置換処理
ユーザー yuppe19 😺yuppe19 😺
提出日時 2015-12-05 18:16:47
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 388 bytes
コンパイル時間 335 ms
コンパイル使用メモリ 6,596 KB
実行使用メモリ 6,452 KB
最終ジャッジ日時 2023-10-12 15:46:59
合計ジャッジ時間 2,845 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
6,156 KB
testcase_01 AC 62 ms
6,220 KB
testcase_02 AC 116 ms
6,408 KB
testcase_03 AC 85 ms
6,388 KB
testcase_04 AC 13 ms
6,360 KB
testcase_05 AC 14 ms
6,224 KB
testcase_06 AC 18 ms
6,296 KB
testcase_07 AC 41 ms
6,228 KB
testcase_08 AC 17 ms
6,296 KB
testcase_09 AC 20 ms
6,224 KB
testcase_10 AC 14 ms
6,452 KB
testcase_11 AC 22 ms
6,248 KB
testcase_12 AC 12 ms
6,224 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 13 ms
6,340 KB
testcase_23 AC 13 ms
6,316 KB
testcase_24 AC 12 ms
6,188 KB
testcase_25 AC 12 ms
6,388 KB
testcase_26 AC 12 ms
6,176 KB
testcase_27 WA -
testcase_28 AC 12 ms
6,216 KB
testcase_29 AC 12 ms
6,276 KB
testcase_30 AC 22 ms
6,448 KB
testcase_31 WA -
testcase_32 AC 21 ms
6,220 KB
testcase_33 AC 43 ms
6,344 KB
testcase_34 AC 45 ms
6,348 KB
testcase_35 AC 16 ms
6,224 KB
testcase_36 AC 12 ms
6,220 KB
testcase_37 AC 13 ms
6,184 KB
testcase_38 WA -
testcase_39 AC 13 ms
6,192 KB
testcase_40 AC 13 ms
6,360 KB
testcase_41 AC 13 ms
6,220 KB
testcase_42 AC 13 ms
6,316 KB
testcase_43 AC 13 ms
6,188 KB
testcase_44 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/python
from collections import defaultdict

def factorize(n):
    res = defaultdict(int)
    d = 2
    while d * d <= n:
        while n % d == 0:
            res[d] += 1
            n /= d
        d += 1
    if n > 1:
        res[n] += 1
    return res

n = int(raw_input())
arr = filter(lambda x: x>2, sorted(factorize(n).keys(), reverse=1)) or [n]
res = arr.pop()
print res
0