結果

問題 No.135 とりあえず1次元の問題
ユーザー syokeininsyokeinin
提出日時 2015-01-30 22:17:00
言語 Ruby
(3.2.2)
結果
AC  
実行時間 149 ms / 5,000 ms
コード長 154 bytes
コンパイル時間 1,071 ms
コンパイル使用メモリ 11,456 KB
実行使用メモリ 25,812 KB
最終ジャッジ日時 2023-08-31 02:08:52
合計ジャッジ時間 3,321 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 146 ms
25,812 KB
testcase_01 AC 72 ms
15,312 KB
testcase_02 AC 72 ms
15,140 KB
testcase_03 AC 73 ms
15,240 KB
testcase_04 AC 69 ms
15,152 KB
testcase_05 AC 69 ms
15,276 KB
testcase_06 AC 70 ms
15,284 KB
testcase_07 AC 69 ms
15,108 KB
testcase_08 AC 70 ms
15,348 KB
testcase_09 AC 66 ms
15,300 KB
testcase_10 AC 69 ms
15,120 KB
testcase_11 AC 67 ms
15,172 KB
testcase_12 AC 69 ms
15,228 KB
testcase_13 AC 71 ms
15,340 KB
testcase_14 AC 69 ms
15,260 KB
testcase_15 AC 70 ms
15,148 KB
testcase_16 AC 71 ms
15,096 KB
testcase_17 AC 67 ms
15,196 KB
testcase_18 AC 68 ms
15,296 KB
testcase_19 AC 71 ms
15,148 KB
testcase_20 AC 68 ms
15,168 KB
testcase_21 AC 111 ms
22,808 KB
testcase_22 AC 149 ms
25,812 KB
evil01.txt AC 147 ms
25,784 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

gets.to_i
result = []
gets.split.map(&:to_i).uniq.sort.each_cons(2) do |a, b|
  result.push (a - b).abs
end
result.push 0 if result.empty?
puts result.min
0