結果
| 問題 |
No.185 和風
|
| コンテスト | |
| ユーザー |
小指が強い人
|
| 提出日時 | 2015-11-10 00:35:48 |
| 言語 | Ruby (3.4.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 312 bytes |
| コンパイル時間 | 61 ms |
| コンパイル使用メモリ | 7,296 KB |
| 実行使用メモリ | 12,288 KB |
| 最終ジャッジ日時 | 2024-09-13 14:17:22 |
| 合計ジャッジ時間 | 1,250 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 WA * 1 |
コンパイルメッセージ
Main.rb:7: warning: ambiguous first argument; put parentheses or a space even after `-' operator Main.rb:14: warning: ambiguous first argument; put parentheses or a space even after `-' operator Syntax OK
ソースコード
n = gets.to_i
bef = -1
n.times do |i|
a = gets.split.map(&:to_i)
d = a[1].to_i - a[0].to_i
if d < 0
puts -1
exit
else
if bef == -1
bef = d
end
if d != bef
puts -1
exit
end
bef = d
end
end
puts bef
小指が強い人