CT709

The parcels Sum Puzzle

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Every season at the tundra station of Whitesnow, someone must fulfill a tricky customer order. This year the task falls to Wheelwright, armed only with the parcels register. Task: Read n integers and print their total sum. Input format: First line: n. Second line: n space-separated integers. Output format: Print the sum of all n values. Constraints: 1 <= n <= 56; -1000000 <= a[i] <= 1000000; answers fit a signed 64-bit integer.

Example 1:

Input: 14 -191256 87971 -108978 -437674 68072 -978481 635309 -939888 -671944 -883028 -423354 81919 -843515 435784
Output: -4169063

Example 2:

Input: 39 117787 -24746 16215 -763033 -818535 -621768 60272 365545 -940290 966721 427143 -255553 -624899 -407896 -970782 945758 -15316 5650 -204480 -473800 -891758 -269059 307974 704038 635510 -78391 827652 726152 -113993 -833501 -318878 -307284 912831 307912 -249366 934135 690023 926617 898117
Output: 1592724

Example 3:

Input: 16 887394 -414105 105982 86079 698727 -298120 533364 -133399 -235284 -781454 -803162 -819155 -701774 826252 -498543 257351
Output: -1289847

Constraints:

1 <= n <= 56; -1000000 <= a[i] <= 1000000; answers fit a signed 64-bit integer.

Loading...
Test Cases:No test cases
No test cases available.
The parcels Sum Puzzle - EASY Coding Problem | CodeTikki