結果

問題 No.643 Two Operations No.2
ユーザー fine
提出日時 2018-02-02 21:29:20
言語 Ruby
(3.4.1)
結果
WA  
実行時間 -
コード長 107 bytes
コンパイル時間 103 ms
コンパイル使用メモリ 7,680 KB
実行使用メモリ 12,416 KB
最終ジャッジ日時 2024-12-31 07:09:11
合計ジャッジ時間 2,078 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 11 WA * 2
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:9: warning: ambiguous first argument; put parentheses or a space even after `-' operator
Syntax OK

ソースコード

diff #

x, y = gets.split.map(&:to_i)
if x == y
    p 0
elsif y == 0
    p 1
elsif x == 0
    p 2
else
    p -1
end
0