When п=24:3(24) + 2(24) + 4(24) - 2472 + 48 + 96 - 24216
When п=10:3(10) + 2(10) + 4(10) - 1030 + 20 + 40 - 1080
When п=100:3(100) + 2(100) + 4(100) - 100300 + 200 + 400 - 100800
When п=24:
3(24) + 2(24) + 4(24) - 24
72 + 48 + 96 - 24
216
When п=10:
3(10) + 2(10) + 4(10) - 10
30 + 20 + 40 - 10
80
When п=100:
3(100) + 2(100) + 4(100) - 100
300 + 200 + 400 - 100
800