ENG
RUS
Timus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board
Discussion of Problem
1131
. Copying
silverfox
Good simulation problem
// Problem
1131. Copying
28 Apr 2022 22:29
Hint:
we start from kk = 1, then kk += kk (2), kk += kk (4) but we cannot advance when kk > k.
get to the maximum kk with this and the remaining n - kk can be easily calculated with
(n - kk) / k + (((n - kk) % k) > 0)
© 2000–2026
Timus Online Judge Team
. All rights reserved.