結果

問題 No.780 オフ会
ユーザー SHuuuuuuuuuuuuA
提出日時 2019-01-19 16:16:59
言語 Ruby
(3.4.1)
結果
WA  
実行時間 -
コード長 246 bytes
コンパイル時間 43 ms
コンパイル使用メモリ 7,424 KB
実行使用メモリ 12,416 KB
最終ジャッジ日時 2024-07-18 00:31:27
合計ジャッジ時間 3,133 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 12 WA * 11
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

people = gets.split.map(&:to_i)

if people[0]+1 == people[1]
    puts "YES"
    puts 0
elsif people[0]+1 > people[1]
    puts "NO"
    puts people[0]+1 - people[1]
elsif people[0]+1 < people[1]
    puts "NO"
    puts people[1] - (people[0]+1)
end
0