Main page Tasks Volumes Ranking Help

Back to task list

Sum in Loop

Now you are to find sum of several numbers (more than two). It will be useful to do this in loop. Perhaps "for" loop will do since the amount of values for summation is given.

Input data format is simple:

Example:

data:
8
10 20 30 40 5 6 7 8

answer:
126

You are to return their sum as an answer.

You need to login to get test data and submit solution.