#кол-во бросков
throws = 3
#кол-во граней
sides = 6
for s in range (1, sides * throws + 1):
wincount = 0
totalcount = 0
for i in range (1, sides + 1):
for j in range (1, sides + 1):
for k in range (1, sides + 1):
if i+j+k == s:
wincount += 1
totalcount += 1
probability = wincount/totalcount
print (s, probability)