보안을 그리다, 훈이

[Baekjoon/Python3] 10103번 주사위 게임 본문

Programming/Python & Data Structures

[Baekjoon/Python3] 10103번 주사위 게임

HooNeee 2020. 12. 6. 03:11

[Baekjoon/Python3] 10103번 주사위 게임

 

www.acmicpc.net/problem/10103

 

10103번: 주사위 게임

첫 라운드는 상덕이의 승리이다. 따라서 창영이는 6점을 잃게 된다. 두 번째 라운드는 두 사람의 숫자가 같기 때문에, 아무도 점수를 잃지 않고 넘어간다. 세 번째 라운드의 승자는 창영이이기

www.acmicpc.net

 

n = int(input())
ares, bres = 100, 100
for i in range(n):
    a, b = map(int, input().split())
    if a > b:
        bres -= a
    elif a < b:
        ares -= b
print(ares, bres, sep='\n')
Comments