⌨️ Algorithms/백준
[Python] 백준 14681번_사분면 고르기
monzheld
2022. 6. 25. 10:55
https://www.acmicpc.net/problem/14681
14681번: 사분면 고르기
점 (x, y)의 사분면 번호(1, 2, 3, 4 중 하나)를 출력한다.
www.acmicpc.net
x = int(input())
y = int(input())
if x > 0 and y > 0:
print(1)
elif x < 0 and y > 0:
print(2)
elif x < 0 and y < 0:
print(3)
else:
print(4)