Pricing Problem, solved using Ruby and rspec