#include using namespace std; #define int long long #ifdef LOCAL_DEBUG #include "LOCAL_DEBUG.hpp" #endif const int MOD = 1e9+7; signed main(){ int n,s,k; cin >> n >> s >> k; s -= n*(n-1)*k/2; if(s <= 0){ cout << 0 << endl; return 0; } static int dp[20001][101]; //iをj以下の自然数の和に分ける場合の数 dp[0][0] = 1; for(int i = 0; i <= s; i++){ for(int j = 0; j <= n; j++){ if(i-j >= 0){ dp[i][j] = dp[i-j][j] + dp[i][j-1]; } else { dp[i][j] = dp[i][j-1]; } dp[i][j] %= MOD; } } cout << dp[s][n] << endl; return 0; }