CT25094

The Square Sum of Rye Hollow

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

It is audit day at the gristmill of Rye Hollow. Ojas spreads the stamps records across the table and picks up a sharp pencil. 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 <= 672; 0 <= a[i] <= 1000000000; answers fit a signed 64-bit integer.

Example 1:

Input: 413 454 8971 9304 8106 9444 8496 2411 2431 6758 1492 2179 2917 5737 4635 1131 9892 643 7409 9660 1695 1531 6377 1643 9494 3418 9977 729 6824 4578 9973 1760 64 7131 7418 3516 4461 8203 2524 6084 9671 7291 6886 6264 5015 3949 1442 8733 4442 5156 7913 5736 2975 2549 2894 3918 6465 2715 3813 3461 3365 9932 3873 5622 5166 8104 4183 4814 2663 8073 8198 1621 2598 9723 507 4357 9498 2006 5134 7940 4719 3068 4912 2248 1154 2876 9556 2761 4345 3693 2808 1953 2783 7537 9726 8347 7694 1946 4173 1958 2920 1895 4237 2956 4507 3032 675 2098 8159 6493 3250 1270 2988 9034 7060 4532 3528 1307 769 4597 5340 7925 8091 2170 5852 4965 8917 5557 3373 8948 174 5110 2663 8673 1257 6604 3629 647 7024 1720 2114 2448 6086 6071 4991 7662 5727 3005 6797 9707 2553 8695 5401 8708 3840 6096 6622 4050 5829 5207 9502 3341 2…
Output: 14227965267

Example 2:

Input: 236 1588 5062 168 7953 9315 9288 9585 1642 6324 2325 629 3433 5747 5745 16 6126 9037 5519 3151 7488 400 5509 4432 8795 7458 619 2204 4035 8938 7611 8632 417 8120 4174 3636 6576 216 9062 6162 4306 3821 8618 7457 9525 2205 945 5687 2253 2950 697 4479 1450 3799 3816 153 5234 9650 9201 3965 9851 1709 9096 7014 9665 7548 3194 9041 7461 8983 9909 1756 1597 4992 6496 4663 2508 5307 228 4619 6897 5763 185 4313 8966 9858 6809 5065 7432 8249 2593 4731 7972 3852 8949 1864 8971 1569 5859 6200 1053 1205 9030 488 2605 1948 235 2935 3249 4785 3192 2709 8205 4626 2718 1821 7484 3589 4802 1610 6215 158 2855 8318 5151 4492 3907 8424 7791 1689 1556 7476 141 9958 503 8865 6543 8893 8094 493 7306 2018 4660 3453 1178 6044 9761 472 4790 1389 6761 3175 3581 7673 6113 8748 6295 6083 9849 8104 1217 5316 5551 2094 2…
Output: 8133865781

Example 3:

Input: 508 5166 4241 8244 6158 9992 2825 6763 369 7335 2244 1137 6225 587 5743 334 4542 8405 5070 6650 1788 3419 3013 5167 8028 5336 3305 5632 1265 4101 5403 343 1643 4640 3744 629 9329 7086 6720 265 1561 1656 7564 9241 7140 7574 1403 5217 4480 602 2846 5664 2831 5798 4406 3919 5130 9352 6352 5590 2029 5239 7521 6667 5331 5155 9315 5458 7196 4384 5348 3422 6006 3728 7424 3817 2810 2749 1311 6660 517 4371 2292 7145 1548 1456 6705 6787 7021 4784 1943 2860 2496 6660 7922 3909 6207 4873 9762 9618 6701 3931 1199 8363 793 7804 3320 7267 5905 202 2807 5551 6517 4 692 8756 1943 8148 6080 9595 8024 4878 2226 9700 9719 3086 7129 1742 9388 1449 8951 9104 7663 2319 1743 9922 8975 7679 660 8995 6270 4393 6397 7937 848 2529 3647 4645 3505 4920 7265 3994 6865 6809 1321 6696 2540 6697 2163 6375 8446 4830 4710 97…
Output: 17085027435

Constraints:

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

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