$/=$";($n,$s,$k)=<>; $s-=$k*$n*($n-1)/2; if($s>0){ $d[$s]=1; for$i(0..$n-1){ for$a(0..$s){ $j=$a; for$b(1..($s-$a)/($n-$i)){ $j+=$n-$i; $d[$a]+=$d[$j]; } $d[$a]%=1e9+7; } } } print$d[0]+0;