//c++
#include <iostream>
using namespace std;
signed main() {
int x, N, _min = 30001;
cin >> N;
for (int i = 0; i < N; i++) {
cin >> x;
if (x < _min && x % 10 == 4)
_min = x;
}
cout << _min << endl;
return 0;
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
//c++
#include <iostream>
using namespace std;
signed main() {
int x, N, _min = 30001;
cin >> N;
for (int i = 0; i < N; i++) {
cin >> x;
if (x < _min && x % 10 == 4)
_min = x;
}
cout << _min << endl;
return 0;
}