xmxx19 @ 2023-06-30 14:28:37
#include<bits/stdc++.h>
using namespace std;
int main()
{
long long a[10000],cc[10000],dd[10000];
long long b,c,d;
cin>>b;
for(long long i=0;i<b;i++){
cin>>cc[i]>>dd[i];
}
for(long long i=0;i<b;i++){
c=1;
for(long long j=1;j<=cc[i];j++){
c*=j;
}
cc[i]=c;
for(;;){
if(cc[i]<=0){
break;
}
else{
if(cc[i]%10==dd[i]){
a[i]++;
}
cc[i]/=10;
}
}
}
for(long long i=0;i<b;i++){
cout<<a[i]<<endl;
}
}
by Endline @ 2023-06-30 15:08:15
您确定
by copper_ingot @ 2023-06-30 15:21:45
老老实实打高精度罢(悲