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
404 B

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