CT894

The Crystal coins of Arjun

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Legend says the vault under the lotus ponds of Tranquil Basin opens only for a perfect tally of coins. Arjun means to find out. 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 <= 21; -1000000 <= a[i] <= 1000000000; answers fit a signed 64-bit integer.

Example 1:

Input: 16 379281405 619366306 11643492 762137196 51891151 59078025 854004073 705841424 442248512 879979329 485302756 194951368 236952219 861083844 791430499 607745621
Output: 7942937220

Example 2:

Input: 21 191488326 187790113 771652495 877161457 201452574 824955142 351380788 569070385 492942912 336944061 347317631 302298843 466591349 346312669 360431413 25546456 825832276 46885428 172103131 793290482 104671569
Output: 8596119500

Example 3:

Input: 20 215816345 603387061 961946174 683889986 14305144 388696613 887536540 178303483 961229545 57959571 582809249 58306947 805349416 861408606 770290249 748057161 735038664 709347045 445689472 405282283
Output: 11074649554

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
The Crystal coins of Arjun - EASY Coding Problem | CodeTikki