본문 바로가기

Programming [Python]/백준 알고리즘 솔루션

#187 백준 파이썬 [10103] 주사위 게임

https://www.acmicpc.net/problem/10103

 

#Solution

n = int(input())
x = y = 100

for _ in range(n):
    a, b = map(int, input().split())
    if a > b:
        y -= a
    elif a < b:
        x -= b
        
print(x, y, sep = "\n")