結果
| 問題 | No.716 距離 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2018-11-20 09:52:27 | 
| 言語 | Ruby (3.4.1) | 
| 結果 | 
                                RE
                                 
                             | 
| 実行時間 | - | 
| コード長 | 227 bytes | 
| コンパイル時間 | 82 ms | 
| コンパイル使用メモリ | 7,424 KB | 
| 実行使用メモリ | 12,544 KB | 
| 最終ジャッジ日時 | 2024-12-24 15:25:01 | 
| 合計ジャッジ時間 | 4,718 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | RE * 40 | 
コンパイルメッセージ
Main.rb:7: warning: found `= literal' in conditional, should be == Syntax OK
ソースコード
n = gets.to_i
a = gets.split.map{|x| x.to_i}.reverse!
min = a[0] - a[1]
n.times do |i|
  if i = 0
    min = a[0] - a[1]
  else
    if min < a[i] - a[i+1]
      min = a[i] - a[i+1]
    end
  end
end
puts min
puts a[0] - a[n]
            
            
            
        