#include using namespace std; int sum[20210] = {}; int dp[110][20110]; int N,S,K; vector v; int dfs(int x,int s){ if( s < 0 ) return 0; if( dp[x][s] != -1 ) return dp[x][s]; if( x == 0 ){ return s == 0; } int ans = 0; for(int i = 0 ; ; i++){ int c = i * x; if( c > s ) break; ans += dfs(x-1,s-c); ans %= 1000000007; } return dp[x][s] = ans; } int main(){ cin >> N >> S >> K; S -= K*N*(N-1)/2; if( S < 0 ) cout << 0 << endl; else{ dp[N][S] = 1; for(register int x = N ; x >= 1 ; x--){ for(register int s = 0 ; s <= S ; s++){ if( dp[x][s] == 0 ) continue; register int c = 0; register int C = dp[x][s]; for(int k = 0 ; c <= s ; k++){ if( c > s ) break; dp[x-1][s-c] += C; if( dp[x-1][s-c] >= 1000000007 ) dp[x-1][s-c] -= 1000000007; c += x; } } } cout << dp[0][0] << endl; } }