結果

問題 No.716 距離
ユーザー LEDLED
提出日時 2019-01-29 02:38:56
言語 Ruby
(3.3.0)
結果
AC  
実行時間 271 ms / 2,000 ms
コード長 154 bytes
コンパイル時間 80 ms
コンパイル使用メモリ 7,680 KB
実行使用メモリ 22,528 KB
最終ジャッジ日時 2024-04-16 18:05:43
合計ジャッジ時間 8,077 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 266 ms
22,400 KB
testcase_01 AC 267 ms
22,528 KB
testcase_02 AC 268 ms
22,272 KB
testcase_03 AC 267 ms
22,528 KB
testcase_04 AC 266 ms
22,400 KB
testcase_05 AC 266 ms
22,272 KB
testcase_06 AC 271 ms
22,528 KB
testcase_07 AC 87 ms
12,160 KB
testcase_08 AC 87 ms
12,416 KB
testcase_09 AC 87 ms
12,288 KB
testcase_10 AC 208 ms
19,840 KB
testcase_11 AC 124 ms
14,464 KB
testcase_12 AC 250 ms
21,760 KB
testcase_13 AC 196 ms
19,200 KB
testcase_14 AC 87 ms
12,416 KB
testcase_15 AC 232 ms
20,864 KB
testcase_16 AC 150 ms
17,024 KB
testcase_17 AC 246 ms
21,248 KB
testcase_18 AC 91 ms
12,288 KB
testcase_19 AC 129 ms
16,384 KB
testcase_20 AC 86 ms
12,288 KB
testcase_21 AC 91 ms
12,160 KB
testcase_22 AC 105 ms
12,672 KB
testcase_23 AC 90 ms
12,288 KB
testcase_24 AC 207 ms
19,712 KB
testcase_25 AC 123 ms
16,000 KB
testcase_26 AC 158 ms
17,664 KB
testcase_27 AC 178 ms
18,560 KB
testcase_28 AC 90 ms
12,416 KB
testcase_29 AC 164 ms
17,920 KB
testcase_30 AC 161 ms
17,536 KB
testcase_31 AC 198 ms
19,328 KB
testcase_32 AC 178 ms
18,560 KB
testcase_33 AC 169 ms
18,048 KB
testcase_34 AC 145 ms
17,152 KB
testcase_35 AC 90 ms
12,288 KB
testcase_36 AC 100 ms
12,672 KB
testcase_37 AC 89 ms
12,288 KB
testcase_38 AC 117 ms
14,336 KB
testcase_39 AC 168 ms
17,792 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

N=gets.to_i
a=gets.split(/\s/).map(&:to_i)
d = []
a.each_with_index{|p1,i|a.each_with_index{|p2,j| d.push((p2-p1).abs) if i != j }}
puts d.min
puts d.max
0