You are viewing a single comment's thread. Return to all comments →
java 8
long sum = bill.stream().mapToInt(Integer::intValue).sum(); sum-=bill.get(k); if (b-(sum/2)==0) { System.out.println("Bon Appetit"); } else { System.out.println(b-(sum/2)); }
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 →
java 8