Условие:

19 + 20 + 1 + 10
27 + 3 + 4 + 6

19 + 20 + 1 + 10 = (19 + 1) + (20 + 10) = 20 + 30 = 50
27 + 3 + 4 + 6 = (27 + 3) + (4 + 6) = 30 + 10 = 40