結果
問題 |
No.979 Longest Divisor Sequence
|
ユーザー |
![]() |
提出日時 | 2020-01-31 21:53:54 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 333 bytes |
コンパイル時間 | 143 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 47,716 KB |
最終ジャッジ日時 | 2024-09-17 08:01:02 |
合計ジャッジ時間 | 6,999 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 14 TLE * 1 -- * 1 |
ソースコード
N=int(input()) A=list(map(int,input().split())) DP=[set() for i in range(18)] DP[0]={1} for a in (A): if a==1: DP[1].add(1) for i in range(17,-1,-1): for s in DP[i]: if a>s and a%s==0: DP[i+1].add(a) for i in range(17,-1,-1): if DP[i]!=set(): print(i) break