#include #if __has_include() #endif using namespace std; #define LL(...) ll __VA_ARGS__;lin(__VA_ARGS__) #define fo(i,...) for(auto[i,i##stop,i##step]=for_range(0,__VA_ARGS__);ivoid pp(const auto&...a){[[maybe_unused]]const char*c="";((o<(a...);} #define entry defpp void main();void main2();}int main(){my::io();my::main();}namespace my{ namespace my{ void io(){cin.tie(nullptr)->sync_with_stdio(0);cout<concept modulary=requires(T t){t.mod();}; templateconstexpr auto for_range(T s,T b){T a=0;if(s)swap(a,b);return array{a-s,b,1-s*2};} templateconstexpr auto for_range(T s,T a,T b,T c=1){return array{a-s,b,(1-s*2)*c};} void lin(auto&...a){(cin>>...>>a);} constexpr auto pow(auto x,ll n,auto e){assert(n>=0);decltype(x)r=e;for(;n;x*=x,n>>=1)if(n&1)r*=x;return r;} constexpr auto pow(auto x,ll n){return pow(x,n,1);} templateusing pack_back_t=tuple_element_t>; } namespace my{ templateconcept vectorial=is_base_of_v::value_type>,remove_cvref_t>; templatestruct vec; templatestruct hvec_helper{using type=vec::type>;}; templatestruct hvec_helper<0,T>{using type=T;}; templateusing hvec=hvec_helper::type; templatestruct vec:vector{ using vector::vector; ll size()const{return vector::size();} vec rev_mobius()const{vec v=*this;if constexpr(vectorial){ }fo(i,v.size()-1)v[i]-=v[i+1];return v;} }; templaterequires(sizeof...(A)>=2)vec(const A&...a)->vec>>; } namespace my{ templateT fac(ll n){static vecv{1};if(ll m=v.size();m<=n){v.resize(n+1);fo(i,m,n+1)v[i]=v[i-1]*i;}return v[n];} templateT comb(ll n,ll k){ if(n<0||k<0||n){ } else return fac(n)/fac(k)/fac(n-k); } } namespace my{entry void main(){ LL(F,N,K); // K番目の値を表す確率変数をXとすると, // E[X]=\sum_{x=1}^F p(x)*x (p(x):大きい方からK番目がxの確率) // E[X]=\sum_{x=1}^F q(x) (q(x):大きい方からK番目がx以上の確率=x以上がK回以上出る確率) vec
q(F+1); fo(x,1,F+1){ dd P=dd(F-(x-1))/F; dd Q=dd(x-1)/F; fo(k,K,N+1)q[x]+=pow(P,k)*pow(Q,N-k)*comb
(N,k); } auto p=q.rev_mobius(); dd ans=0; fo(x,1,F+1)ans+=p[x]*x; pp(ans); }}