scientific_comp_projects/CODE/[python]kattis/trivial/dice_cup.py
2021-10-29 15:16:40 +02:00

14 lines
289 B
Python

dice = input()
dice1, dice2 = dice.split(' ')
values = []
for i in range(int(dice1)):
for j in range(int(dice2)):
values.append(i+j+2)
d = {x:values.count(x) for x in set(values)}
maxi = max(d.values())
for key in d.keys():
if d[key] == maxi :
print(key)