You are viewing a single comment's thread. Return to all comments →
I ♥ Ruby
get_ary = -> { gets.split.map(&:to_i) } n, k = get_ary.() cost = get_ary.() charge = gets.to_i refund = charge - (cost.reduce(:+) - cost[k])/2 puts refund != 0 ? refund : 'Bon Appetit'
Bill Division
You are viewing a single comment's thread. Return to all comments →
I ♥ Ruby