You are viewing a single comment's thread. Return to all comments →
int games=0; int cost=0; while(p>=m){ games++; if((cost+p)>s){ exit(0); } else{ cost+=p; } p=p-d; } while(cost<=s){ games++; cost+=m; } return games-1; }
Seems like cookies are disabled on this browser, please enable them to open this website
Halloween Sale
You are viewing a single comment's thread. Return to all comments →