何松羽 • 3个月前
#include<bits/stdc++.h>
using namespace std;
int main() {
//出生小队在迪奥森林发现了7891
int n, x, b = 0;
cin >> n;
int a[n];
for (int i = 0; i < n; i++) {
cin >> a[i];
}
for (int i = 0; i < n; i++) {
if (a[i] % 2 == 0) {
x = a[i];
while (x > 0) {
x = x / 10;
b++;
}
if (b % 2 == 0) {
cout << a[i] << endl;
}
}
}
return 0;
}
评论: