B. Yet Another Meme Problem
#include<stdio.h>
int main()
{
int t;
for(scanf("%d",&t);t--;)
{
long long n, d, c = 0, t = 9;
scanf("%lld %lld",&n,&d);
while(t <= d)
{
static_cast<void>(c++) , t = t * 10 + 9;
}
printf("%lld\n",n * c);
}
return 0;
}
来源:CSDN
作者:king9666
链接:https://blog.csdn.net/king9666/article/details/103996271