OJ-Problems-Source/HDOJ/4450_autoAC.cpp
2016-09-06 13:31:25 +08:00

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;
}