This commit is contained in:
2023-06-24 22:31:18 +02:00
parent 85e678bd91
commit 7c4fc5880b

9
dicecup.py Normal file
View File

@@ -0,0 +1,9 @@
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)