Dice Cup
This commit is contained in:
9
dicecup.py
Normal file
9
dicecup.py
Normal 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)
|
||||||
Reference in New Issue
Block a user