You are viewing a single comment's thread. Return to all comments →
i like it more w/o lambdas
i=gets.split.last.to_i costs=gets.split.map(&:to_i) diff = gets.to_i - (costs.inject(:+) - costs[i]) / 2 puts diff.zero? ? "Bon Appetit" : diff
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 →
i like it more w/o lambdas