문제
https://www.acmicpc.net/problem/14681
14681번: 사분면 고르기
점 (x, y)의 사분면 번호(1, 2, 3, 4 중 하나)를 출력한다.
www.acmicpc.net
답
A = int(input())
B = int(input())
if A>0 and B>0:
print(1)
elif A<0 and B>0:
print(2)
elif A<0 and B<0:
print(3)
else:
print(4)
'코딩 노트 > ALGORITHM' 카테고리의 다른 글
[BOJ/2753/Python3] 윤년 (0) | 2021.11.21 |
---|---|
[BOJ/9498/Python3] 시험성적 (0) | 2021.11.21 |
[BOJ/1330/Python3] 두 수 비교하기 (0) | 2021.11.21 |
[BOJ/2588/Python3] 곱셈 (0) | 2021.11.21 |
[BOJ/10869/Python3] 사칙연산 (0) | 2021.11.21 |