摘要: 1 LL pow1_sum(LL a,LL b,LL mod) //a*b%mod 2 { 3 a=a%mod; 4 b=b%mod; 5 LL cur=0; 6 while(b) 7 { 8 if(b&1) 9 {10 cur=cur+a;11 if(cur>=mod) cur=cur-mod;12 }13 a=a=mod) a=a-mod;15 b=b>>1;16 }17 return cur;18 }19... 阅读全文
posted @ 2014-02-17 21:41 芷水 阅读(119) 评论(0) 推荐(0) 编辑