結果
| 問題 | No.185 和風 |
| コンテスト | |
| ユーザー |
小指が強い人
|
| 提出日時 | 2015-11-10 00:35:48 |
| 言語 | Ruby (4.0.7 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 312 bytes |
| 記録 | |
| コンパイル時間 | 9 ms |
| コンパイル使用メモリ | 8,576 KB |
| 実行使用メモリ | 14,464 KB |
| 最終ジャッジ日時 | 2026-08-26 05:55:45 |
| 合計ジャッジ時間 | 1,573 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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
小指が強い人