You are viewing a single comment's thread. Return to all comments →
try this -
int wrap = m; bool flag = true; int choc = 0; while(wrap>=m) { if(flag) { wrap = 0; flag = false; choc += n / c; wrap = n / c; } else { choc += wrap / m; if (wrap == m) wrap = 0; else wrap = (wrap / m) + (wrap % m); } } Console.WriteLine(choc);
Seems like cookies are disabled on this browser, please enable them to open this website
Chocolate Feast
You are viewing a single comment's thread. Return to all comments →
try this -