結果

問題 No.135 とりあえず1次元の問題
ユーザー wonda_t_coffeewonda_t_coffee
提出日時 2020-01-29 10:53:54
言語 Ruby
(3.3.0)
結果
TLE  
実行時間 -
コード長 193 bytes
コンパイル時間 61 ms
コンパイル使用メモリ 11,344 KB
実行使用メモリ 30,824 KB
最終ジャッジ日時 2023-10-14 05:22:43
合計ジャッジ時間 12,804 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 -- -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
evil01.txt -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n
Syntax OK

ソースコード

diff #

n = gets.chomp.to_i

x = gets.chomp.split.map(&:to_i).uniq

if x.size == 1
  puts 0
  exit
end

ans = 0xffffffff
x.permutation(2) do |p|
  x1, x2 = p
  ans = [ans, (x1-x2).abs].min
end
puts ans
0