eolymp
bolt
Try our new interface for solving problems
Problems

Throwing dice

Throwing dice

Cube whose faces are marked with numbers from \textbf{1} to \textbf{6}, drop out \textbf{N} times. Determine the probability that the sum of the dropped numbers will be exactly equal to \textbf{Q}. \InputFile The program receives as input two integers: \textbf{N} and \textbf{Q} (\textbf{1} ≤ \textbf{N} ≤ \textbf{500}, \textbf{1} ≤ \textbf{Q} ≤ \textbf{3000}). \OutputFile The program should bring a unique real number, which must be different from the true value by not more than \textbf{0.01} of true value.
Time limit 1 second
Memory limit 64 MiB
Input example #1
1 6
Output example #1
0.16666