結果

問題 No.643 Two Operations No.2
ユーザー horiesiniti
提出日時 2018-03-30 18:28:48
言語 Ruby
(3.4.1)
結果
AC  
実行時間 86 ms / 2,000 ms
コード長 129 bytes
コンパイル時間 52 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 12,416 KB
最終ジャッジ日時 2024-06-26 00:32:56
合計ジャッジ時間 2,043 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 13
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:11: warning: ambiguous first argument; put parentheses or a space even after `-' operator
Syntax OK

ソースコード

diff #

x,y=gets.split.map{|e| e.to_i}
if x==y
	puts 0
elsif x==0
	puts 2
elsif y==0
	puts 1
elsif x.abs==y.abs
	puts 3
else
	puts -1
end
0