풀이 : 값을 받아 사분면의 위치를 구합니다.
코드
x = gets.chomp.to_i y = gets.chomp.to_i if x>0 and y>0 puts "1" elsif x<0 and y>0 puts "2" elsif x<0 and y<0 puts "3" else puts "4" end
코드 링크