Frevo-on-rails-problema-1 is a project mainly written in Ruby, it's free.
Problema 1 - Caixa Eletrônico (Versão Alternativa)
Pernambuco Ruby User Group
What is the minimum set of bills that sums up to a given amount of money? Assume the machine is provided an unlimited amount of bills in the following values: 2, 5, 10, 20, 50 and 100.
$ bin/atm 107 248
For $ 107:
1 * $ 100
1 * $ 5
1 * $ 2
For $ 248:
2 * $ 100
2 * $ 20
4 * $ 2
$ bin/atm 11
Unable to withdraw $ 11.
$ gem install bundler
$ bundle install
$ autotest
If you don't like autotest and autotest-growl, just run:
$ bundle install --without autotest
Mail us at [email protected] if you need help.