CT23758

The Square Sum Beneath Mossgrieve

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

The council of the peat bogs of Mossgrieve pays by the answer, and Yami intends to earn it. First: the full register of readings. 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 <= 571; -1000000 <= a[i] <= 1000; answers fit a signed 64-bit integer.

Example 1:

Input: 121 -966368 -706948 -132472 -756072 -267017 -299253 -82502 -521656 -689479 -318707 -645749 -914124 -937369 -67590 -857780 -684088 -169156 -762087 -754150 -181477 -233004 -157883 -924460 -788773 -384981 -261395 -152938 -857425 -540284 -474266 -558679 -620483 -799071 -336145 -630958 -628034 -497422 -300574 -907179 -545582 -730845 -838048 -597594 -700638 -715643 932 -11673 -357832 -202559 -228515 -194097 -492315 -877243 -890611 -245752 -2204 -293519 -711989 -652006 -595697 -411015 -764933 -833434 -423478 -328940 -760716 -384456 -169795 -447764 -703550 -985185 -383831 -120467 -573126 -439146 -802121 -662185 -170513 -64381 -835792 -319049 -475894 -534528 -634253 -366634 -528370 -735159 -903801 -408232 -683387 -804601 -343252 -34370 -691156 -223346 -462147 -232617 -80904 -212019 -749849 -681318 …
Output: 42712559065775

Example 2:

Input: 355 -221067 -456581 -791295 -444864 -85725 -8450 -414879 -322778 -418427 -817694 -395846 -18125 -106122 -7797 -237853 -948739 -38323 -145731 -282531 -80054 -891141 -207071 -858223 -333956 -246425 -931009 -288225 -579761 -228876 -376291 -104051 -687201 -663999 -38281 -191362 -607354 -591243 -62668 -246605 -8682 -102626 -858740 -665944 -43908 -355016 -987909 -472108 -960118 -743224 -289816 -723331 -371259 -276441 -571958 -673857 -529695 -913499 -219917 -810639 -425193 -486781 -288 -208945 -670604 -21924 -3827 -825693 -312740 -919763 -764437 -330217 -831507 -418426 -666134 -941946 -668830 -460538 -630272 -904780 -758765 -139444 -441376 -298144 -436577 -849328 -819568 -565032 -661412 -99774 -75102 -770310 -326663 -110200 -93099 -830088 -602904 -551325 -179358 -263060 -722615 -9217 -255413 -744…
Output: 110535699985709

Example 3:

Input: 533 -877653 -502211 -253046 -637280 -605866 -579995 -802311 -409479 -771639 -233012 -304523 -834052 -404570 -999316 -893633 -66873 -675912 -366392 -504413 -795522 -828566 -977306 -722746 -950486 -914609 -125430 -344034 -825205 -219982 -373958 -684437 -48881 -900468 -412094 -8951 -188036 -646932 -733984 -880193 -868245 -642131 -636291 -855934 -696149 -279495 -439007 -531129 -535167 -16709 -658692 -575249 -754288 -136840 -393932 -421793 -769852 -879149 -414013 -569589 -115062 -88574 -438384 -35412 -802422 -831529 -321697 -350707 -575254 -98589 -634692 -566473 -890352 -926981 -650380 -634062 -270088 -561741 -410459 -210560 -290652 -207299 -695414 -276036 -909520 -408070 -675243 -80660 -446506 -406171 -76385 -57800 -712257 -787191 -747629 -392374 -992096 -120886 -938182 -509883 -681645 -833381…
Output: 179938100218104

Constraints:

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

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