This a math question.
Antonia and David are playing a game. Each player starts with 100 points.
For each round, who win with n points, another person score subtract n.
Finally, print Antonia and David score.
N = int(input())
a = 100
b = 100
for i in range(N):
s = input().rstrip().split()
ca = int(s[0])
cb = int(s[1])
if ca > cb:
b -= ca
elif ca < cb:
a -= cb
print(a)
print(b)
コメント