• 2024-12-17LUOGU_P1045(高精度+快速幂取模)
    高精度乘法+快速幂取模直接搞定,不多赘述,详见注释! #include<iostream>#include<cstdio>#include<cmath>#include<cstring>usingnamespacestd;inta[501],p,k[501],c[501],d;//底数a[],指数p,模10^500,余k[]voidtimes(intx){//高精度乘法 memset(c,0,sizeof(c));