Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

反复平方..

Posted by 3d_fly at 2010-07-23 14:02:14 on Problem 1995
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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator