Files
kattis/dicecup.py
2023-06-24 22:31:18 +02:00

10 lines
276 B
Python

d1, d2 = map(int, input().split())
scores = [x + y for x in range(1, d1 + 1) for y in range(1, d2 + 1)]
x = 0
for i in range(2, d1 + d2 + 1):
if scores.count(i) > x:
x = scores.count(i)
for i in range(2, d1 + d2 + 1):
if scores.count(i) == x:
print(i)