結果

問題 No.716 距離
コンテスト
ユーザー nononaga
提出日時 2020-09-24 22:05:48
言語 Ruby
(4.0.1)
コンパイル:
ruby -w -c _filename_
実行:
ruby _filename_
結果
AC  
実行時間 133 ms / 2,000 ms
コード長 125 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 277 ms
コンパイル使用メモリ 8,960 KB
実行使用メモリ 19,200 KB
最終ジャッジ日時 2026-03-16 16:43:29
合計ジャッジ時間 5,315 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 40
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n
Syntax OK

ソースコード

diff #
raw source code

n=gets.to_i
aNs=gets.split.map(&:to_i).sort
result = aNs.combination(2).map{|a|a.max - a.min}
puts result.min
puts result.max
0