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 ecjtubaowp at 2007-05-20 17:33:51 on Problem 2447
In Reply To:过的了1811 为何就过不了这个题目,大牛看一下我的扩展欧几里德没错吧,换了好几个版本了,谢过 Posted by:xiaox at 2007-05-20 17:19:05
__int64 Euclid(__int64 a,__int64 b) 
{ 
   __int64 n1=a,n2=b,x1=1,y1=0,q,r,x2=0,y2=1,t;
   if(n2==0){x=1;y=0;return n1;}
   loop:
   q=n1/n2;r=n1-q*n2;
   if(r==0){x=x2;y=y2;return n2;}
   else
   {n1=n2;n2=r;t=x2;x2=x1-q*x2;x1=t;t=y2;y2=y1-q*y2;y1=t;
   goto loop;
   } 
}

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