結果
| 問題 | No.780 オフ会 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-02-08 21:57:43 |
| 言語 | Ruby (4.0.2) |
| 結果 |
AC
|
| 実行時間 | 51 ms / 2,000 ms |
| + 96µs | |
| コード長 | 245 bytes |
| 記録 | |
| コンパイル時間 | 9 ms |
| コンパイル使用メモリ | 8,960 KB |
| 実行使用メモリ | 14,464 KB |
| 最終ジャッジ日時 | 2026-08-01 05:31:52 |
| 合計ジャッジ時間 | 2,619 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 23 |
コンパイルメッセージ
Syntax OK
ソースコード
z,w = gets.split(" ").map!{|i| i.to_i}
if (z + 1 ) == w then
puts "YES"
puts 0
elsif (z + 1) < w then
puts "YES"
puts ( w - (z + 1))
elsif (z + 1) > w then
puts "NO"
puts ((z + 1) - w)
elsif ( z == w) then
puts "NO"
puts 1
end