Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
反复平方..unsigned Montgomery(unsigned a,unsigned b,unsigned m) { unsigned k=1; a%=m; while(b) { if(b&1) k=(k*a)%m; a=(a*a)%m; b>>=1; } return k; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator