#include using namespace std; #define rep(i,n) for(ll i=0;i=0;i--) #define perl(i,r,l) for(ll i=r-1;i>=l;i--) #define fi first #define se second #define pb push_back #define ins insert #define pqueue(x) priority_queue,greater> #define all(x) (x).begin(),(x).end() #define CST(x) cout<; using vvl=vector>; using pl=pair; using vpl=vector; using vvpl=vector; const ll MOD=1000000007; const ll MOD9=998244353; const int inf=2e9+1; const ll INF=4e18; const ll dy[8]={-1,0,1,0,1,1,-1,-1}; const ll dx[8]={0,-1,0,1,1,-1,1,-1}; template inline bool chmax(T &a, T b) { return ((a < b) ? (a = b, true) : (false)); } template inline bool chmin(T &a, T b) { return ((a > b) ? (a = b, true) : (false)); } using ld=double; ld f(ld x){//標準正規分布のxの値 return expl(-x*x/2)/sqrtl(acosl(-1.0)*2); } ld simpson(ld x0,ld x_max){ ll n=1000000; ld delta = (x_max - x0)/n; ld a; a = f(x0); a += f(x0 + delta * n); int i; for(i=1; i> n >> l >> r; chmax(l,n);chmin(r,n*6); CST(10); if(n>=10000){ ld m=3.5*n; ld s=35.0*n;s/=12;s=sqrtl(s); cout << calc(m,s,l,r) << endl; } else{ vector dp={1}; rep(i,n){ vector ndp((i+1)*6+2); rep(j,dp.size()){ if(dp[j]<1e-10)continue; rep(k,6)ndp[j+k+1]+=dp[j]/6; } swap(dp,ndp); } ld ans=0; for(ll i=l;i<=r;i++)ans+=dp[i]; cout << ans << endl; } }