結果
問題 | No.716 距離 |
ユーザー |
![]() |
提出日時 | 2019-01-29 02:38:56 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 266 ms / 2,000 ms |
コード長 | 154 bytes |
コンパイル時間 | 104 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 22,400 KB |
最終ジャッジ日時 | 2024-10-07 17:20:06 |
合計ジャッジ時間 | 7,899 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 40 |
コンパイルメッセージ
Syntax OK
ソースコード
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