結果
問題 |
No.780 オフ会
|
ユーザー |
![]() |
提出日時 | 2020-11-06 20:22:49 |
言語 | Ruby (3.4.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 158 bytes |
コンパイル時間 | 45 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 12,288 KB |
最終ジャッジ日時 | 2024-07-22 11:53:31 |
合計ジャッジ時間 | 3,065 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 WA * 11 |
コンパイルメッセージ
Main.rb:5: warning: `elsif' at the end of line without an expression Main.rb:7: warning: string literal in condition Syntax OK
ソースコード
def calc(input) a, b = input.split.map(&:to_i) if a < b "YES\n#{ b - a - 1 }" elsif "NO\n#{ a - b }" end end # p calc("3 4") puts calc(gets)