10346 - Peter's Smokes

All about problems in Volume 103. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA


Post by brianfry713 »

deddy one wrote:a simple formula like this will get you AC -- > ans = n + ((n-1) / (k-1))
Check input and AC output for thousands of problems on uDebug!

Posts: 587
Joined: Wed Jun 11, 2014 9:56 pm
Location: Kyrgyzstan, Bishkek

Re: 10346 - Peter's Smokes

Post by lighted »


Code: Select all

17 3
Acc Output

Code: Select all

Don't calculate sum1 and c separately. Calculate them together. :)
A person who sees the good in things has good thoughts. And he who has good thoughts receives pleasure from life... Bediuzzaman

Post Reply

Return to “Volume 103 (10300-10399)”