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 |
Re:这题怎么做?In Reply To:这题怎么做? Posted by:sad at 2005-05-02 16:13:44 解Pell方程嘛,先写一个高精度,然后就判断N是不是完全平方数,是的话应该是没解的,x^2-ny^2=(x-sqrt(n)y)(x+sqrt(n)y)>1,不是的话就有解。把sqrt(n)展开成循环连分数,求出循环节长度。然后就按照数论书上写的式子算吧,没什么,就是编码很烦很烦。 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator