CSES - Dice Probability | Xác suất xúc xắc

View as PDF



Problem types
Points: 1600 Time limit: 1.0s Memory limit: 512M Input: stdin Output: stdout

Bạn gieo một viên xúc xắc \(n\) lần, và mỗi lần gieo sẽ tạo ra kết quả từ \(1\) đến \(6\). Xác suất mà tổng các kết quả nằm giữa \(a\)\(b\) là bao nhiêu?

Input

  • Dòng đầu vào duy nhất chứa ba số nguyên n, a và b.

Output

  • In xác suất được làm tròn đến sáu chữ số thập phân.

Constraints

  • \(1\leq n\leq 100\)
  • \(1\leq a\leq b\leq 6n\)

Example

Sample input

2 9 10

Sample output

0.194444


Comments

There are no comments at the moment.