#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
int T;
scanf("%d",&T);
while(T--)
{
int l,r;
scanf("%d %d",&l,&r);
int sum=0;
while(l!=0 || r!=0)
{
sum+=r-l;
l/=10;
r/=10;
}
printf("%d\n",sum);
}
return 0;
}
CF 1538 F Interesting Function
猜你喜欢
转载自blog.csdn.net/Ambrumf/article/details/120900594
今日推荐
周排行