You are viewing a single comment's thread. Return to all comments →
Here is my c++ solution you can find the video here : https://youtu.be/MHFroRIBGQc
void bonAppetit(vector<int> bill, int k, int b) { int s = accumulate(bill.begin(), bill.end(), -1 * bill[k]); int c = s / 2; if(c == b) cout << "Bon Appetit"; else cout << b - c; }
Seems like cookies are disabled on this browser, please enable them to open this website
Bill Division
You are viewing a single comment's thread. Return to all comments →
Here is my c++ solution you can find the video here : https://youtu.be/MHFroRIBGQc