count = 0 for i in range(1, 13): for t in range(1, 4): for n in range(0, 10): if i == t + n: count = count + 1 print(count)