You are viewing a single comment's thread. Return to all comments →
A Java 8 version (very simple):
int max = IntStream.range(0,n).map(x -> x!=k?ar[x]:0).sum()/2; System.out.println(max==b?"Bon Appetit":(b-max));
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 →
A Java 8 version (very simple):