CodeMentor.
Ask AIProblemsLearnC++TCSCore CSHRProgress
0Lv 1
ProblemsHackerRank Warmup

A Very Big Sum

Easy
HackerRank
3/12
EasyHackerRank Warmup

A Very Big Sum

Same as array sum, but values are around 1e10. int overflows. Use long long.

Examples

Example 1

Input

5
1000000001 1000000002 1000000003 1000000004 1000000005

Output

5000000015

Stuck? Take a nudge

C++17Autosaves