zhu_zhu_zhi_shen_zhu @ 2022-08-05 12:33:19
#include<bits/stdc++.h>
using namespace std;
string s,t;
int a[100010]={0},b[100010]={0},c[100010]={0},fe[100010]={0},e=0;
int len=1;
int main(){
int c,n,m;
cin >> c;
for(int q = 1,z=0;q <= c;q++,e++,z++)
{
cin >> n >> m;
a[1]=1;
for(int i=1;i<=n;i++){
for(int j=1;j<=len;j++) {
a[j]=a[j]*i;
}
int p=1;
while(a[p]>=10 || p<len){
a[p+1]+=a[p]/10;
a[p]%=10;
p++;
}
len=p;
}
for(int i=len;i>=1;i--)
{
if(a[i] == m)
{
fe[e]++;
}
}
}
for(int i=0;i!=e;i++) cout << fe[i] << endl;
return 0;
}
by Hisaishi_Kanade @ 2022-08-05 12:40:15
高精乘低精写错了
by zhu_zhu_zhi_shen_zhu @ 2022-08-05 12:44:22
谢谢 已过