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 }

 

posted on 2012-10-29 22:05  仁者无敌8勇者无惧  阅读(133)  评论(0编辑  收藏  举报

导航