728x90
https://www.acmicpc.net/problem/9610
#B9610
n = int(input())
q1=q2=q3=q4=axis=0
for _ in range(n):
x, y = map(int, input().split())
if x>0 and y>0:
q1+=1
elif x<0 and y>0:
q2+=1
elif x<0 and y<0:
q3+=1
elif x>0 and y<0:
q4+=1
else:
axis+=1
print("Q1: %d" %q1)
print("Q2: %d" %q2)
print("Q3: %d" %q3)
print("Q4: %d" %q4)
print("AXIS: %d" %axis)
728x90
'Programming Practice > Python' 카테고리의 다른 글
백준 7897 그릇 파이썬 (0) | 2023.09.05 |
---|---|
백준 8958 OX퀴즈 파이썬 (0) | 2023.09.05 |
백준 1934 파이썬 최소공배수 (0) | 2023.09.04 |
백준 10886 파이썬 0=not cute / 1=cute (0) | 2023.09.04 |
백준 10988 파이썬 팰린드롬인지 확인하기 (0) | 2023.09.04 |