# Answer to Question #54015 in Ruby | Ruby on Rails for lakshmi

Question #54015

Tom, Dick and Harry go to a restaurant. Each of them has a certain amount of money. When their monies are pooled they discover they have S Rs. Next, they start going through the menu card to choose items they would like to order.

Your task is to help them find out how many different menu item combinations they can order. Since there can be many menu items with the same price, we are interested only in unique price combinations. Refer output specifications and examples to get a better understanding.

Constraints:

Pi > 0 ; where i = 1 to N and Pi denotes the price of the ith item

S > 0

i need a code .......

Your task is to help them find out how many different menu item combinations they can order. Since there can be many menu items with the same price, we are interested only in unique price combinations. Refer output specifications and examples to get a better understanding.

Constraints:

Pi > 0 ; where i = 1 to N and Pi denotes the price of the ith item

S > 0

i need a code .......

Expert's answer

## Comments

## Leave a comment