Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
230 B
2
Indexable
Never
#include <iostream>
using namespace std;

int main()
{
	int a, n, max = 0;
	cin >> n;
	for (int i = 0; i < n; i++)
	{
		cin >> a;
		if (max < a && a%2 == 0)max = a;
	}
	if (max == 0)cout << "NO";
	else cout << max;
}