不多说
[cpp]
// File Name: hdu4450.cpp
// Author: bo_jwolf
// Created Time: 2013年05月24日 星期五 14:33:25
#include
#include
#include
// File Name: hdu4450.cpp
// Author: bo_jwolf
// Created Time: 2013年05月24日 星期五 14:33:25
#include
#include
#include
using namespace std;
int main()
{
int n ;
int ans , a ;
while( scanf( "%d" , &n ) != EOF && n)
{
ans = 0 ;
while( n-- )
{
scanf( "%d" ,&a ) ;
ans += a * a ;
}
printf("%d\n",ans);
}
return 0;
}