← Back to List

28289번: 과 조사하기 ↗

Solutions

Python 3
253 B | 253 chars
n = int(input())
l = [[*map(int, input().split())] for i in range(n)]


print(sum([i[1] <= 2 and i[0] != 1 for i in l]))
print(sum([i[1] == 3 and i[0] != 1 for i in l]))
print(sum([i[1] == 4 and i[0] != 1 for i in l]))
print(sum([i[0] == 1 for i in l]))