eolymp
bolt
Try our new interface for solving problems
Problems

Throwing dice

Throwing dice

A dice with faces numbered from $1$ to $6$ is rolled $n$ times. Find the probability that the sum of all the rolled numbers will be exactly $q$. \InputFile Two integers $n$ and $q~(1 \le n \le 500, 1 \le q \le 3000)$. \OutputFile Print the required probability with at least two decimal places.
Time limit 1 second
Memory limit 128 MiB
Input example #1
1 6
Output example #1
0.16666