Răspuns :

Răspuns:

#include <iostream>

using namespace std;

int main()

{unsigned int n,i,s,x;

cin>>n;

s=0;

for (i=1;i<=n;i++)

   {cin>>x;

   if (x%8==0)

       s=s+x;}

cout<<s;

return 0;

}