

[풀이1]
x = int(input())
y = int(input())
if x>0:
if y>0:
print('1')
else:
print('4')
else:
if y>0:
print('2')
else:
print('3')
[풀이2]
x = int(input())
y = int(input())
if x>0 and y>0:
print('1')
elif x>0 and y<0:
print('4')
elif x<0 and y>0:
print('2')
elif x<0 and y<0:
print('3')
'백준 - 파이썬 > 단계별 - 2 (조건문)' 카테고리의 다른 글
[백준/파이썬] 2525번 오븐 시계 (0) | 2025.05.02 |
---|---|
[백준/파이썬] 2884번 알람 시계 (0) | 2025.04.10 |
[백준/파이썬] 2753번 윤년 (0) | 2025.04.07 |
[백준/파이썬] 9498번 시험 성적 | 풀이 2개 (0) | 2025.04.07 |
[백준/파이썬] 1330번 | 두 수 비교하기 (0) | 2025.04.07 |