c++ / gcc 7.3.0
#include
#include
#include
int main()
{
unsigned short int N;
unsigned int result = 0;
std::cin >> N;
std::vector arr;
while(true)
{
unsigned short int tmp;
std::cin >> tmp;
if(tmp != 0)
arr.push_back(tmp);
break;
}
std::for_each(arr.cbegin(), arr.cend(), [&result](auto& var)
{
if(var > 99 && var < 1000 && (var % 4 == 0))
result += var;
});
std::cout << result << std::endl;</p>
return 0;
}