a = prima zi
b = a doua zi
c = a treia zi
a + b + c = 1000
a + b = 640
b = 40 + 2 × a
a + 40 + 2 × a = 640
3 × a + 40 = 640
3 × a = 640 - 40
3 × a = 600
a = 600 : 3
a = 200
b = 40 + 2 × 200
b = 40 + 400
b = 440
200 + 440 + c = 1000
640 + c = 1000
c = 1000 - 640
c = 360