mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
a34c463144
4400-4499
13 lines
197 B
C++
13 lines
197 B
C++
#include<cstdio>
|
|
int main()
|
|
{
|
|
int n,i,s,a;
|
|
while(scanf("%d",&n),n)
|
|
{
|
|
s=0;
|
|
while(n--){scanf("%d",&a);s+=a*a;}
|
|
printf("%d\n",s);
|
|
}
|
|
return 0;
|
|
}
|