CT27369

The Brass stamps of Gino

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Before the gates of the tulip beds of Bloomhaven close for winter, Gino must finish the stamps ledger - one figure at a time. Task: Read n integers and print the sum of their squares. Input format: First line: n. Second line: n space-separated integers. Output format: Print the sum of squares. Constraints: 1 <= n <= 824; -100 <= a[i] <= 1000000000; answers fit a signed 64-bit integer.

Example 1:

Input: 46 7116 1761 6437 5598 8044 2046 1451 5441 5463 5900 8827 5517 5391 6447 5951 2676 7987 2372 9379 6290 7456 3768 5454 44 4433 3176 8986 2584 2684 148 9235 692 2445 3027 276 2504 4967 8649 3070 4382 6907 3240 3585 9883 7200 6961
Output: 1438578154

Example 2:

Input: 27 7392 8528 8706 3978 354 8564 3216 7569 3891 7560 9311 4874 8467 7247 4351 9901 425 8980 3731 1959 1414 5565 1172 280 4523 8689 348
Output: 1013078401

Example 3:

Input: 760 5371 9740 5243 6956 8379 2935 7576 4544 7633 6213 1544 1837 7986 5452 435 3444 4562 6516 8644 5742 5579 55 1382 6324 2867 4785 7656 3731 5115 5595 7112 8812 6740 8819 6613 5424 4875 6709 3817 7488 1462 4325 1263 2299 4062 7134 2868 8565 9465 4945 6221 7474 2255 9890 2842 1784 3253 5416 7532 6892 7785 9132 9370 8953 8772 6338 4749 9690 3639 9036 1903 8221 2794 4808 196 5599 6772 8322 8540 6248 5922 3862 9411 2240 8694 2929 1492 4142 929 485 8011 3247 7060 946 3114 2908 3615 1832 4267 6212 6673 6711 4183 2315 3590 2728 4130 6570 2525 7962 7793 7541 9 6597 4677 6499 -17 536 306 1000 9423 3441 134 1964 101 5901 3582 9894 2462 8530 8896 5955 1831 1059 9140 2647 3827 8745 8177 6561 2422 9036 5989 1040 9844 5685 1820 450 1494 7534 4677 4711 7154 9608 2641 9558 9498 225 4544 1486 2537 4491 128…
Output: 24825737611

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.