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

100题 发题解留念

Posted by xindubawukong at 2014-09-16 23:39:48 on Problem 2109
是要求满足k^n=p的那个k
其实不用pow也能求
两边取对数得
  n*ln(k)=ln(p)
  ln(k)=ln(p)/n
  k=exp(ln(p)/n)
用double就可以
log是一个很好用的东西,有的时候取一下对数就简单多了

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