2012 金华现场赛 I题

http://acm.hdu.edu.cn/showproblem.php?pid=4450

巨水题,不解释

View Code
 1 #include<stdio.h>
 2 int main()
 3 {
 4     int n;
 5     int c;
 6     int i;
 7     while(~scanf("%d",&n),n)
 8     {
 9         int sum=0;
10         for(i=0;i<n;i++)
11         {
12             scanf("%d",&c);
13             sum+=c*c;
14         }
15         printf("%d\n",sum);
16     }
17 }
原文地址:https://www.cnblogs.com/1114250779boke/p/2745459.html