-코드
r1, r2 = 0, 0
for _ in range(int(input())):
p1, p2 = map(int, input().split())
if (p1 == 1 and p2 == 3) or (p1 == 2 and p2 == 1) or (p1 == 3 and p2 == 2):
r1 += 1
elif (p1 == 3 and p2 == 1) or (p1 == 1 and p2 == 2) or (p1 == 2 and p2 == 3):
r2 += 1
print(max(r1, r2))
'Beakjoon&프로그래머스 > 파이썬' 카테고리의 다른 글
[백준/파이썬]8394번 악수 (0) | 2021.08.02 |
---|---|
[백준/파이썬]15489번 파스칼 삼각형 (0) | 2021.07.30 |
[백준/파이썬]15489번 피보나치 수 4 (0) | 2021.07.29 |
[백준/파이썬]14916번 거스름돈 (0) | 2021.07.29 |
[백준/파이썬]9655번 돌 게임 (0) | 2021.07.29 |