結果
| 問題 |
No.312 置換処理
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-12-05 18:27:29 |
| 言語 | Python2 (2.7.18) |
| 結果 |
AC
|
| 実行時間 | 72 ms / 2,000 ms |
| コード長 | 333 bytes |
| コンパイル時間 | 149 ms |
| コンパイル使用メモリ | 7,040 KB |
| 実行使用メモリ | 7,040 KB |
| 最終ジャッジ日時 | 2024-11-15 11:51:27 |
| 合計ジャッジ時間 | 3,333 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 45 |
ソースコード
#!/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