Răspuns:
#include <iostream>
using namespace std;
int main ()
{
int v[1005],n,i,s1,s2,r,m;
cin>>n;
s2=0;
for(i=1;i<=n;i++)
cin>>v[i];
for(i=1;i<=n;i++)
{
s1=0;
m=v[i];
while(v[i]!=0)
{
r=v[i]%10;
s1=s1+r;
v[i]=v[i]/10;
}
if(s1%2==0)
s2=s2+m;
}
cout<<s2;
return 0;
}