cnt = 0 for i in range(1, 13): for j in range(1, 31): if j // 10 + (j - (j // 10 * 10)) == i: cnt += 1 print(cnt)