結果

問題 No.390 最長の数列
ユーザー hogeover30hogeover30
提出日時 2016-09-20 23:54:52
言語 Ruby
(3.2.2)
結果
AC  
実行時間 1,069 ms / 5,000 ms
コード長 125 bytes
コンパイル時間 220 ms
コンパイル使用メモリ 11,492 KB
実行使用メモリ 31,292 KB
最終ジャッジ日時 2023-07-25 18:28:42
合計ジャッジ時間 6,266 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 165 ms
23,164 KB
testcase_01 AC 127 ms
23,016 KB
testcase_02 AC 153 ms
23,240 KB
testcase_03 AC 131 ms
22,924 KB
testcase_04 AC 155 ms
23,248 KB
testcase_05 AC 174 ms
31,188 KB
testcase_06 AC 986 ms
31,028 KB
testcase_07 AC 123 ms
23,232 KB
testcase_08 AC 92 ms
23,252 KB
testcase_09 AC 124 ms
23,092 KB
testcase_10 AC 302 ms
31,220 KB
testcase_11 AC 289 ms
31,292 KB
testcase_12 AC 275 ms
31,048 KB
testcase_13 AC 308 ms
28,840 KB
testcase_14 AC 1,069 ms
31,028 KB
testcase_15 AC 89 ms
23,036 KB
testcase_16 AC 90 ms
23,200 KB
testcase_17 AC 101 ms
22,948 KB
testcase_18 AC 103 ms
23,500 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

c=[0]*m=1000001;gets;gets.split.map{|i|c[i=i.to_i]=1;i}.sort.map{|i|j=i;c[j]=[c[j],c[i]+1].max if c[j]>0while m>j+=i};p c.max
0