• + 1 comment

    Java 8

        bill.remove(k);
        int actual = bill.stream().mapToInt(Integer::intValue).sum() / 2;
        if(actual == b){
            System.out.println("Bon Appetit");
        } else {
            int refund = b - actual;
            System.out.println(refund);
        }