結果

問題 No.716 距離
ユーザー gemmaro
提出日時 2019-09-12 10:03:19
言語 Ruby
(3.4.1)
結果
AC  
実行時間 91 ms / 2,000 ms
コード長 93 bytes
コンパイル時間 104 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 12,288 KB
最終ジャッジ日時 2024-07-02 17:00:36
合計ジャッジ時間 4,966 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 40
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:4: warning: `:' after local variable or literal is interpreted as binary operator
Main.rb:4: warning: even though it seems like symbol literal
Syntax OK

ソースコード

diff #

gets
a=gets.split.map &:to_i
m=2*10**5
a.each_cons(2){|x,y|d=y-x;m=(d<m)?d :m}
p m,a[-1]-a[0]
0