摘要: 1 int powermod(int a,int b,int c) 2 { 3 int ans=1; 4 a=a%c; 5 while(b>0) 6 { 7 if(b%2==1) 8 ans=(ans*a)%c; 9 b=b/2; 10 a=(a*a)%c; 11 } 12 ... 阅读全文
posted @ 2017-05-04 12:38 TTTCoder 阅读(196) 评论(0) 推荐(0) 编辑