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

A 32-bit signed integer can happily deal with the given data range : ]

Posted by Magic347 at 2011-11-15 20:00:03 on Problem 3219
In Reply To:物理课上着上着就想到错哪儿了,别这么低级了啊!!!位运算看不懂的话就看我这个吧。。。 Posted by:ltj_njust at 2010-11-02 12:53:52
The worst case for the number of factor 2 of a given big number in this problem would be:

    2^31/2 + 2^30/2 + 2^29/2 + ... + 2^2/2 + 2^1/2
  = 2^30 + 2^29 + 2^28 + ... + 2^1 + 2^0
  = 2^31 - 1

A 32-bit signed integer could happily hold this. 





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