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

Re:这题怎么做?

Posted by frkstyc at 2005-05-02 16:28:27 on Problem 2427
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:
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