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

取个对数 + Stirling公式

Posted by 768059009 at 2017-04-27 18:21:07 on Problem 2661
如果直接计算 2^x - 1 < n! 是一定会溢出的,所以不妨对左右取对数,使之变为 x*log10(2) < log10(n!)
然后用Stirling公式计算一下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