結果

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

ソースコード

diff #
raw source code

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

def divisors(n):
    sq = int(n ** .5)
    res = ((i, n/i) for i in xrange(1, sq+1) if n%i==0)
    from itertools import chain
    flatten = chain.from_iterable
    return flatten(res)

n = int(raw_input())
arr = sorted(filter(lambda x:x>2, divisors(n)))
res = arr[0]
print res
0