Melborp Elcissalc
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

Grammy has a favorite number k. She thinks that all the numbers divisible by k are good.

For each array containing only numbers from 0 to k-1, Grammy define its goodness as the number of non-empty consecutive subarrays that sums to a good number.

Please count the number of arrays of length n such that its goodness is t. Since the answer can be enormous, output the answer modulo .

输入描述:

A single line contains three integers n,k,t ().

输出描述:

Output a single number, denoting the answer modulo .
示例1

输入

复制
2 5 1

输出

复制
12
示例2

输入

复制
7 10 15

输出

复制
2016
示例3

输入

复制
46 50 171

输出

复制
645560469