結果
問題 |
No.390 最長の数列
|
ユーザー |
👑 ![]() |
提出日時 | 2025-08-05 22:15:11 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 238 bytes |
コンパイル時間 | 316 ms |
コンパイル使用メモリ | 82,384 KB |
実行使用メモリ | 224,088 KB |
最終ジャッジ日時 | 2025-08-05 22:15:19 |
合計ジャッジ時間 | 7,660 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 WA * 1 |
other | AC * 8 WA * 3 RE * 4 |
ソースコード
from collections import defaultdict N = int(input()) a = list(map(int,input().split())) a.sort() dic = defaultdict(int) for x in a: for y in range(2*x,a[-1]+1,x): dic[y] = max(dic[y],dic[x]+1) print (max(dic.values())+1)