We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
There's been an error in statement/test cases. At some point of time statement said "For each operation, she can give 1,3,5 chocolates to all but one colleague" but test cases were made for "1, 2, 5".
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Equal
You are viewing a single comment's thread. Return to all comments →
First of all, change
steps += gap/3 ; gap = gap% 3;
to
steps += gap/2 ; gap = gap%2;
There's been an error in statement/test cases. At some point of time statement said "For each operation, she can give 1,3,5 chocolates to all but one colleague" but test cases were made for "1, 2, 5".