結果
問題 |
No.390 最長の数列
|
ユーザー |
![]() |
提出日時 | 2017-05-19 17:44:02 |
言語 | Python2 (2.7.18) |
結果 |
TLE
|
実行時間 | - |
コード長 | 267 bytes |
コンパイル時間 | 545 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 20,244 KB |
最終ジャッジ日時 | 2024-09-18 22:48:51 |
合計ジャッジ時間 | 6,864 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 2 TLE * 1 -- * 12 |
ソースコード
n = int(raw_input()) l = map(int, raw_input().split()) l.sort() p = [] m = 1 for x in l: c = 1 for (a,b) in p: if x == a or x / 2 < a: break elif x % a == 0: c = max(c, b+1) p.append((x,c)) m = max(m,c) print m