728x90
https://www.acmicpc.net/problem/10103
10103번: 주사위 게임
첫 라운드는 상덕이의 승리이다. 따라서 창영이는 6점을 잃게 된다. 두 번째 라운드는 두 사람의 숫자가 같기 때문에, 아무도 점수를 잃지 않고 넘어간다. 세 번째 라운드의 승자는 창영이이기
www.acmicpc.net
import sys
n = int(input())
sum_1 = sum_2 = 100
for _ in range(n):
n1, n2 = map(int, sys.stdin.readline().strip().split())
if n1 > n2:
sum_2 -= n1
elif n2 > n1:
sum_1 -= n2
else:
continue
print(sum_1)
print(sum_2)
728x90
'CS > Algorithm' 카테고리의 다른 글
[Python : 11098] 첼시를 도와줘! (0) | 2022.02.03 |
---|---|
[Python : 1977] 완전제곱수 (0) | 2022.02.03 |
[Python : 10214] Baseball (0) | 2022.02.03 |
[Python : 11557] Yangjojang of The Year (0) | 2022.02.03 |
[Python] 주요 라이브러리의 문법 (0) | 2022.01.31 |