Do you like Ruby on Rails? Show yourself in the competition from Ciklum and win a free pass to the RubyConfUa 2010 conference !
Conference => sharing experience with like-minded colleagues => saving time on learning new products.
Create and send us a utility (link to the code, the code itself), until October 10 inclusive, to the address email@example.com. In the letter, specify the name, city, contact details (except mail).
Criteria for evaluation:
Code quality, documentation (comments)
On October 12, Ciklum will respond to all participants and announce the 3 winners on its website dedicated to the IT Community. The RubyConfUa 2010 conference takes place in Kiev on October 16 - 17. If you wish, you can visit only one day. ')
Write a utility that would calculate the probability of obtaining the number K when throwing N M-sided dice.
The utility should take three arguments in the following order: 0) K - the number, the probability of which is calculated; 1) N - the number of thrown bones; 2) M is the number of faces at each bone.
The utility should return only the calculated value as a FLOAT.