#include using namespace std; #define int long long #ifdef LOCAL_DEBUG #include "LOCAL_DEBUG.hpp" #endif signed main(){ int n,s,k; cin >> n >> s >> k; if(s < n*(n-1)*k/2) cout << 0 << endl; else{ static int dp[101][20001]; //生徒iの金額が決まった時クラス合計金額がj円になる場合の数 dp[0][0] = dp[1][0] = 1; for(int i = 0; i < n; i++){ for(int j = 0; j <= s; j++){ for(int d = k; d <= s; d++){ if(j + d*(n-i) > s) break; dp[i+1][j + d*(n-i)] += dp[i][j]; dp[i+1][j + d*(n-i)] %= 1000000007; } } } cout << dp[n][s] << endl; } return 0; }