Help with COINS!

Unable to figure out errors. Link to my solution is

Please HELP!!!

please post link to your solution

1 Like

Here is the link to my solution.

not able to view your solution if you could just paste it on some other platform and send link then

https://www.codechef.com/viewsolution/33361970

You are using a global map and hence for every new test case map is not empty and it uses already stored values.Correct this and i would suggest use array. Also take input this way
while(cin>>n)
{
// Try Yourself first
}
solution- CodeChef: Practical coding for everyone

Thanks !:slightly_smiling_face: