#include #include using namespace std; const int mod = 1000000007; int dp[101][20001]; main(){ int n,s,k;cin>>n>>s>>k; s -= ((n+(n-1))/2)*((n+(n-1))/2+1)/2*k; dp[0][0] = 1; if(0>s){ cout << 0 << endl; return 0; } for(int i = 0; n > i; i++){ for(int j = 0; s >= j; j++){ if(dp[i][j] != 0){ for(int l = 0; s >= j+l*(n-i); l++)dp[i+1][j+l*(n-i)]=(dp[i+1][j+l*(n-i)]+dp[i][j])%mod; } } } cout << dp[n][s] << endl; }