반응형
#include <iostream>
using namespace std;
int main() {
int n; cin >> n;
while (n--) {
int cnt = 0;
int a, b; cin >> a >> b;
while (a <= b) {
int x = a;
if (x == 0)cnt++;
else if (x >= 10) {
while (x / 10 != 0) {
if (x % 10 == 0)cnt++;
x /= 10;
}
}
a++;
}
cout << cnt<<"\n";
}
}
반응형
댓글