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

long long就够了

Posted by CLOUD_ZERO at 2006-11-01 15:21:03 on Problem 1289
key:输入一个数字是A=(n+1)^k,一个是B=n^k,必然一个偶数一个基数。分析偶数中2的个数,设为T,k必然是T的一个因数。而k的最大范围是31。最多做30次分析就够了,然后注意n=1的特殊情况。最后输出的2个数字中,一个小于B而另外一个不会超过30*A。so,只需要long long。

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