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
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: 585
- Joined: Wed Jun 11, 2014 9:56 pm
- Location: Kyrgyzstan, Bishkek
Don't calculate sum1
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