結果

問題 No.135 とりあえず1次元の問題
ユーザー hadrorihadrori
提出日時 2015-07-25 23:57:19
言語 Ruby
(3.2.2)
結果
AC  
実行時間 156 ms / 5,000 ms
コード長 141 bytes
コンパイル時間 325 ms
コンパイル使用メモリ 11,264 KB
実行使用メモリ 26,528 KB
最終ジャッジ日時 2023-09-01 03:54:11
合計ジャッジ時間 4,439 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 156 ms
26,444 KB
testcase_01 AC 78 ms
15,076 KB
testcase_02 AC 78 ms
15,200 KB
testcase_03 AC 79 ms
15,132 KB
testcase_04 AC 78 ms
15,092 KB
testcase_05 AC 78 ms
14,996 KB
testcase_06 AC 78 ms
15,240 KB
testcase_07 AC 78 ms
15,140 KB
testcase_08 AC 78 ms
15,152 KB
testcase_09 AC 78 ms
15,072 KB
testcase_10 AC 78 ms
15,176 KB
testcase_11 AC 78 ms
15,072 KB
testcase_12 AC 79 ms
15,048 KB
testcase_13 AC 78 ms
15,072 KB
testcase_14 AC 79 ms
15,176 KB
testcase_15 AC 78 ms
15,064 KB
testcase_16 AC 79 ms
15,072 KB
testcase_17 AC 78 ms
15,032 KB
testcase_18 AC 79 ms
15,000 KB
testcase_19 AC 81 ms
15,108 KB
testcase_20 AC 80 ms
15,052 KB
testcase_21 AC 133 ms
24,184 KB
testcase_22 AC 155 ms
26,528 KB
evil01.txt AC 148 ms
26,412 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

gets
x=gets.split.map(&:to_i).sort.uniq
n=x.length
f = 0
if n > 1
  f=x[1]-x[0]
  (n-1).times do |i|
    f=[f,x[i+1]-x[i]].min
  end
end
p f
0