Editorial for Сандар қосындысы


Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.

Hint 1.

Барлық берілген сандарды жеке қарастырып шығу керек.

Hint 2.

Қосындыны бірден табу емес, оны біртіндеп жинақтау ыңғайлы.

Hint 3.

Әр жаңа санды оқыған сайын оны ағымдағы қосындыға қосып отырыңыз.