Code Golf Challenge P2 - Summation

View as PDF

Submit solution

Points: 5 (partial)
Time limit: 2.0s
Memory limit: 64M

Author:
Problem type

You are given N integers, and you must print out the sum of the integers.

Input Specification

There will be one line of input.

The first number in the line will be the N (1 \le N \le 1 000).

The next N numbers will the integers you must add up, a_1, a_2, \ldots, a_N (0 \le a_i \le 10^6).

Output Specification

Print the sum of the N integers on the first line.

Scoring

Let L represent the number of characters in your solution.

If L is less than 80 characters, you will receive \min(1, 1 - \frac{L-40}{40}) \times 100\% of the points.

Otherwise, your score is 0.

Sample Input

4 3 4 2 5

Sample Output

14

Comments

There are no comments at the moment.