#include using namespace std;

int main() { int L, R; cin >> L >> R;

int a = 0;
for (int i = L; i <= R; i++) {
    int t = i;      
    int c = 0;     
    while (t > 0) {
        if (t % 10 == 2) { 
            c++;
        }
        t = t / 10;      
    }
    if (c == 3) {
        a++;
    }
}
cout << a << endl;
return 0;

}

1 条评论

  • 1