結果

問題 No.312 置換処理
コンテスト
ユーザー yuppe19 😺
提出日時 2015-12-05 18:16:47
言語 PyPy2
(7.3.15)
結果
WA  
実行時間 -
コード長 388 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 139 ms
コンパイル使用メモリ 77,560 KB
最終ジャッジ日時 2025-12-03 18:20:21
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 32 WA * 13
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#!/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