摘要:
(m+n)%c=(m%c+n%c)%c; (19+4)%3=(19%3+4%3)%3; (m*n)%c=((m%c)*(n%c))%c; m^n%c=(m%c)^n%c; 3^11%8=(3^10 * 3^1)%8=((3^2)^5 * 3^1)%8=((8+1)^5 * 3^1)%8…… 阅读全文
摘要:
int hmod(string a,int b)//高精度取余单精度 输出余数 { int temp=0; unsigned long len=a.length(); for(int i=0;i<len;i++) temp=(temp*10+a[i]-'0')%b; return temp; } 阅读全文