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:若不存在整数k,高精度二分不一定要向下取整,因此WA

Posted by 572218888 at 2019-04-16 16:14:19 on Problem 2109
In Reply To:若不存在整数k,高精度二分不一定要向下取整,因此WA Posted by:justryit at 2013-07-27 09:47:35
> 比如
> 60 1152921504606846975
> (1152921504606846975是2的60次方-1)
> 因为超过double精度所以后面的-1被忽略了,用double的程序输出2;
> 而因为-1,所以p比2^60小,向下取整的高精度二分会输出1;
> 
> 岂不是二分还要看double的精度来取整???
> 数据该改一改了“there exists an integer k, 1<=k<=109 such that kn = p.”

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