honey_pot

[python] 백준 9610번 본문

문제 풀이

[python] 백준 9610번

_tera_ 2021. 6. 8. 00:00

n = int(input())
Q1, Q2, Q3, Q4, AXIS = 0, 0, 0, 0, 0
for i in range(n):
    x, y = map(int, input().split())
    if x >0 and y > 0:
        Q1 += 1
    elif y > 0 > x:
        Q2 += 1
    elif x < 0 and y < 0:
        Q3 += 1
    elif x > 0 > y:
        Q4 += 1
    elif x == 0 or y == 0:
        AXIS += 1
print("Q1: "+str(Q1))
print("Q2: "+str(Q2))
print("Q3: "+str(Q3))
print("Q4: "+str(Q4))
print("AXIS: "+str(AXIS))

'문제 풀이' 카테고리의 다른 글

[python] 백준 10162번  (0) 2021.06.08
[python] 백준 5717번  (0) 2021.06.08
[python] 백준 9506번  (0) 2021.06.06
[python] 백준 2476번  (0) 2021.06.06
[python] 백준 4101번  (0) 2021.06.06
Comments