deddy one wrote:a simple formula like this will get you AC -- > ans = n + ((n-1) / (k-1))
10346 - Peter's Smokes
Moderator: Board moderators
-
- Guru
- Posts: 5947
- Joined: Thu Sep 01, 2011 9:09 am
- Location: San Jose, CA, USA
Re: 10346 - Peter's Smokes
Input
Acc Output
Don't calculate sum1 and c separately. Calculate them together.
Code: Select all
17 3
Code: Select all
25
A person who sees the good in things has good thoughts. And he who has good thoughts receives pleasure from life... Bediuzzaman