結果
問題 |
No.312 置換処理
|
ユーザー |
|
提出日時 | 2015-12-05 18:14:37 |
言語 | Python2 (2.7.18) |
結果 |
WA
|
実行時間 | - |
コード長 | 377 bytes |
コンパイル時間 | 201 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 6,784 KB |
最終ジャッジ日時 | 2024-09-14 14:28:56 |
合計ジャッジ時間 | 2,498 ms |
ジャッジサーバーID (参考情報) |
judge4 / 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