#P10815. 【模板】快速读入

【模板】快速读入

Background

Stealing the testdata and printing it directly to grab the best score is a serious violation. Depending on the severity, your account may be banned.

Operation “Lift the Restrictions”!

Problem Description

You are given nn numbers. You need to compute their sum and output it.

Input Format

The first line contains an integer nn.

The next line contains nn integers separated by spaces, representing the given nn numbers.

Output Format

Output one number in a single line, which is the sum of the given numbers.

5
-1 2 -3 4 -5
-3

Hint

For 25%25\% of the data, n=105n=10^5.

For 25%25\% of the data, n=106n=10^6.

For 25%25\% of the data, n=107n=10^7.

For 25%25\% of the data, n=108n=10^8.

For 100%100\% of the data, all numbers are within [n,n][-n,n].

The testdata guarantees that for any prefix of the sequence, the sum of this prefix fits within the storage range of a 32-bit signed integer.

Translated by ChatGPT 5