結果

問題 No.312 置換処理
ユーザー yuppe19 😺
提出日時 2015-12-05 18:16:47
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 388 bytes
コンパイル時間 280 ms
コンパイル使用メモリ 6,912 KB
実行使用メモリ 6,656 KB
最終ジャッジ日時 2024-09-14 14:28:59
合計ジャッジ時間 2,231 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 32 WA * 13
権限があれば一括ダウンロードができます

ソースコード

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