一个主要问题就是364875103=97*3761599;
#include <cstdio>
#include <iostream>
#include <cstdlib>
#define M (364875103LL)
#define M1 (97LL)
#define M2 (M/M1)
#define LL long long
using namespace std;
LL fac1[M1+9],fac2[M2+9];
LL mod(LL a,LL b,LL m)
{
a%=m;
LL ans=1;
while(b)
{
if(b&1) ans=ans*a%m;
a=a*a%m;
b>>=1;
}
return ans;
}
LL inv(LL a,LL m)
{
return mod(a,m-2,m);
}
LL C(int n,int m,LL mod,LL *fac)
{
......
阅读全文