結果
| 問題 | No.312 置換処理 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-12-05 18:14:37 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 377 bytes |
| 記録 | |
| コンパイル時間 | 376 ms |
| コンパイル使用メモリ | 77,636 KB |
| 最終ジャッジ日時 | 2025-12-03 18:20:15 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge6 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 17 WA * 28 |
ソースコード
#!/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())) or [n]
res = arr.pop()
print res