Условие:

1358
1476
1585
139 + 8
114 + 9
168 + 9

1358 = 88 = 0
1476 = 76 = 1
1585 = 75 = 2
139 + 8 = 4 + 8 = 12
114 + 9 = 7 + 9 = 16
168 + 9 = 8 + 9 = 17