Language: C++

using namespace std;
int main() {
	vector<int>s;
	bool x = true;
	int n;
	int aux;
	int total = 0;
	int rest = 105;
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> aux;
		s.push_back(aux);
		total += aux;
	}
	if (total % 10 != 0){
		cout << total << endl;
		x = false;
}
	else if (total % 10 == 0) {
		for (int i = 0; i < n; i++) {
			if (s[i] % 10 > 0)
			rest = min(rest, s[i]);
		}
		if (rest<105) {
			
		cout << total-rest << endl;
		x = false;
		}
	}
	if (x == true) cout << 0 << endl;
	return(0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'vector' was not declared in this scope
    3 |         vector<int>s;
      |         ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
  +++ |+#include <vector>
    1 | using namespace std;
a.cc:3:16: error: expected primary-expression before 'int'
    3 |         vector<int>s;
      |                ^~~
a.cc:9:9: error: 'cin' was not declared in this scope
    9 |         cin >> n;
      |         ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:12:17: error: 's' was not declared in this scope
   12 |                 s.push_back(aux);
      |                 ^
a.cc:16:17: error: 'cout' was not declared in this scope
   16 |                 cout << total << endl;
      |                 ^~~~
a.cc:16:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:34: error: 'endl' was not declared in this scope
   16 |                 cout << total << endl;
      |                                  ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
a.cc:21:29: error: 's' was not declared in this scope
   21 |                         if (s[i] % 10 > 0)
      |                             ^
a.cc:22:32: error: 'min' was not declared in this scope; did you mean 'main'?
   22 |                         rest = min(rest, s[i]);
      |                                ^~~
      |                                main
a.cc:26:17: error: 'cout' was not declared in this scope
   26 |                 cout << total-rest << endl;
      |                 ^~~~
a.cc:26:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:26:39: error: 'endl' was not declared in this scope
   26 |                 cout << total-rest << endl;
      |                                       ^~~~
a.cc:26:39: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:30:24: error: 'cout' was not declared in this scope
   30 |         if (x == true) cout << 0 << endl;
      |                        ^~~~
a.cc:30:24: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:30:37: error: 'endl' was not declared in this scope
   30 |         if (x == true) cout << 0 << endl;
      |                                     ^~~~
a.cc:30:37: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'