//https://ncode.syosetu.com/n4830bu/302/ #include using namespace std; int main() { long long N, L, R; cin >> N >> L >> R; if (N < 10000) { vector dp(N * 6 + 10); dp[0] = 1; for (int _ = 0; _ < N; _++) { vector dp_nxt(N * 6 + 10); for (int i = 0; i < N * 6; i++) { for (int j = 1; j <= 6; j++) { dp_nxt[i + j] += dp[i] / 6; } } swap(dp_nxt, dp); } long double ans = 0; for (int i = L; i <= min(N * 6, R); i++) { ans += dp[i]; } cout << fixed << setprecision(10) << ans << endl; } else { auto maine = [&](long double x) { long double mu = 3.5 * N, sigma = sqrt(35.0 / 12 * N); return (1.0l + erf((x - mu) / sqrt(2) / sigma)) / 2.0l; }; cout << fixed << setprecision(10) << maine(R + 0.5) - maine(L - 0.5) << endl; } }