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

对N的最大修改位数<=K的位数+1,想优化的去改代码吧

Posted by grapland at 2010-02-09 19:38:36 on Problem 3373
设K的位数为D,通过修改N的最后(D+1)位,至少可以生成(K+1)个连续的新数,在这(K+1)个数中一定有一个数可以整除K.

所以对任何修改超过(D+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