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 |
我的gcd()是这样写的:In Reply To:是不是有负数的原因? Posted by:TN at 2005-05-03 12:10:06 __int64 gcd(__int64 aa,__int64 bb) { if (aa<0) aa=-aa; if (bb<0) bb=-bb; if (aa==0) return bb; return gcd(bb%aa,aa); } 觉得负数应该不会影响吧 Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator