[Codeforces2015ICL,Finals,Div. 1#J]Ceizenpok's formula(扩展Lucas定理+中国剩余定理)
题目描述传送门题解扩展Lucas定理+中国剩余定理模板题。代码#include#include#include#include#includeusingnamespacestd;#defineLLlonglongLLn,m,MOD,ans;LLfast_pow(LLa,LLp,LLMod){LLans=1LL;for(;p;p>>=1,a=a*a%Mod)if(p&1)ans=ans*a%Mod;