You are viewing a single comment's thread. Return to all comments →
My c# submission;
public static void bonAppetit(List<int> bill, int k, int b) { var annaPayment = (bill.Sum() - bill[k])/2; Console.WriteLine(annaPayment == b ? "Bon Appetit" : (b - annaPayment).ToString()); }
Seems like cookies are disabled on this browser, please enable them to open this website
An unexpected error occurred. Please try reloading the page. If problem persists, please contact support@hackerrank.com
Bill Division
You are viewing a single comment's thread. Return to all comments →
My c# submission;