#include #include #include #include #include #include #include constexpr int64_t kMod = 1'000'000'000LL + 7; int64_t memo[100 + 1][20000 + 1]; int64_t N, K; int64_t solve(int64_t i, int64_t S) { if(memo[i][S]) { if(memo[i][S] == -1) return 0; return memo[i][S]; } if(S < 0) { memo[i][S] = -1; return 0; } if(i == N) { if(S % N == 0) { return 1; } return 0; } int64_t t = 0; for(int v = 0; (v + K) * i <= S; v++){ t += solve(i + 1, S - (v + K) * i); } t %= kMod; if(t == 0) { memo[i][S] = -1; } else { memo[i][S] = t; } return t; } int main(int argc, char *argv[]) { int64_t S; std::cin >> N >> S >> K; std::cout << solve(1, S) << std::endl; return 0; }