You are viewing a single comment's thread. Return to all comments →
int chocolates = n / c; int exchange_wrappers = chocolates;
do{ int rem = exchange_wrappers % m; exchange_wrappers = exchange_wrappers / m; chocolates += exchange_wrappers; exchange_wrappers = exchange_wrappers + rem; }while(exchange_wrappers >= m); return chocolates;
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 →
int chocolates = n / c; int exchange_wrappers = chocolates;