eolymp
bolt
Try our new interface for solving problems
Problems

Two Lottery Games

Two Lottery Games

Yesterday, when you were passing by the newsstand near your home, you saw an advertisement for lottery games. The advertisement said "Choose m different numbers between \textbf{1} and \textbf{n}, inclusive. We will also randomly pick \textbf{m} different numbers between \textbf{1} and \textbf{n}, inclusive, and if you have at least \textbf{k} numbers in common with us, you win!". You want to know the probability of winning this lottery game. \InputFile Each line is a separate test that contain three integers \textbf{n}, \textbf{m} and \textbf{k}. It is known that \textbf{2} ≤ \textbf{n} ≤ \textbf{8}, \textbf{1} ≤ \textbf{m} ≤ \textbf{n} - \textbf{1}, \textbf{1} ≤ \textbf{k} ≤ \textbf{m}. \OutputFile For each test case print in a separate line with \textbf{4} digits after the decimal point the probability of winning the lottery game.
Time limit 1 second
Memory limit 64 MiB
Input example #1
3 2 1
8 2 1
8 4 2
Output example #1
1.0000
0.4643
0.7571