You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
360 B

#include <bits/stdc++.h>
using namespace std;
bool check(int x) {
int sum = 0;
while (x) {
int a = x % 10;
x /= 10;
sum += a;
}
return sum % 2 == 0;
}
int main() {
int n, m;
cin >> n >> m;
for (int i = n; i <= m; i++)
if (check(i))
cout << i << endl;
return 0;
}