結果
問題 |
No.185 和風
|
ユーザー |
|
提出日時 | 2025-07-29 13:01:18 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 88 ms / 1,000 ms |
コード長 | 195 bytes |
コンパイル時間 | 138 ms |
コンパイル使用メモリ | 7,936 KB |
実行使用メモリ | 12,928 KB |
最終ジャッジ日時 | 2025-07-29 13:01:20 |
合計ジャッジ時間 | 1,664 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 7 |
コンパイルメッセージ
Main.rb:15: warning: ambiguous first argument; put parentheses or a space even after `-` operator Syntax OK
ソースコード
def ii() gets.chomp.to_i end def li() gets.chomp.split.map(&:to_i) end n=ii() t=[] n.times do x,y=li() t<<y-x end t=t.uniq if t.size!=1||t[0]<=0 puts -1 else puts t[0] end