CT645

The Quiet crates of Galen

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Deep in the honey farms of Buzzwell, Galen studies rows of crates entries. One clean number will settle the guild's oldest argument. 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 <= 95; -100 <= a[i] <= 1000000000; answers fit a signed 64-bit integer.

Example 1:

Input: 63 4032 285 6111 7590 3679 5923 7676 9767 5458 1804 5895 3321 9786 427 9992 4149 118 8151 7857 2488 2830 1744 1585 8011 7757 6888 1144 5479 6371 9010 2306 1459 5755 1909 3208 3291 2967 8507 9272 4624 9682 5092 567 7092 472 2399 -51 1704 5731 413 1983 8950 4430 2533 59 312 1749 6810 8019 872 1334 2463 7505
Output: 1833767290

Example 2:

Input: 32 7189 4280 1205 8286 1634 5000 8774 8726 4661 98 3200 5345 9737 7646 7200 7677 2304 7301 6063 2789 1711 6224 3374 -31 4614 1818 781 7819 8147 4079 5123 4643
Output: 1018853725

Example 3:

Input: 88 9715 6539 9399 7186 3960 6419 4990 5287 9729 2477 4115 159 8051 2012 2271 860 2798 5249 612 3373 2300 937 6072 7337 6935 3460 6958 7996 2675 4570 531 7531 9644 5614 9698 4260 4638 7382 1792 1779 7521 8169 4396 6339 5164 9220 8578 8222 6496 6101 800 6400 9256 3734 6992 9380 1620 -56 4756 2522 3483 6831 2893 2110 6139 6475 200 8468 4787 6143 1484 237 5617 6320 4817 5803 4831 1502 3359 1295 6001 10000 2802 8530 9176 2306 3764 9373
Output: 2985681240

Constraints:

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

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