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

一种解法

Posted by 20053565 at 2013-03-08 20:21:40 on Problem 1662
另 z = 2 * n + 1
求满足 (2 ^ m) % z == 1 或者 (2 ^ m) % z == z - 1 (m > 0) 的最小m (求解这个可以先尝试解决3243)

如果 (2 ^ m - 1) % z == 0

输出 n * m;
否则 n * m - 1;

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