func main() const mod: int :: 1000000007 var n: int :: cui@inputInt() var d: int :: cui@inputInt() var k: int :: cui@inputInt() ; dp[i][j] = val ; i: 移動した回数 ; j: 昇ったステップ ; val: 通り数 var dp: [][]int :: #[n + 1, k + 1]int do dp[0][0] :: 1 for i(0, n - 1) for j(0, k - 1) for x(1, d) if(dp[i][j] <> 0 & j + x <= k) do dp[i + 1][j + x] :+ dp[i][j] do dp[i + 1][j + x] :% mod end if end for end for end for var ans: int :: dp[n][k] do cui@print("\{ans}\n") end func