Friday, December 12, 2014

ACM 1131. Copying / Копирование

  First of all the rate of copying is 1, then after the next move the rate will be 2*1, and then 2*2*1, until the rate reaches K. If the rate is constant then the answer is N/K and +1 if N is not fully divisible on K. You need to implement the process of the rate growth and decrease the number of remaining computers, and then add N/K to the final answer ( +1 if N is not fully divisible on K).


       FULL SOURCE CODE

No comments:

Post a Comment