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:我用公式算到是2 * a + sqrt(4 + 4 * a * a),如果不是整数就再取整加一,但是总得到WA,谁来解释下?

Posted by happy_apple_good at 2010-06-06 12:21:00 on Problem 1183
In Reply To:我用公式算到是2 * a + sqrt(4 + 4 * a * a),如果不是整数就再取整加一,但是总得到WA,谁来解释下? Posted by:yzx at 2007-05-02 20:15:22
   因为取sq=sqrt(a*a+1)或是sq=sqrt(a*a+1)+1时,(a*a+1)%sq不一定为0,而题目中数据是整数,且要被整除

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