Biggest Set Ever

아직 제출이 없습니다시간 제한3초메모리 제한512 MB

문제

A set of nonnegative integers is fine if and only if all numbers in the set are less than TT and their sum is equivalent to rem\mathit{rem} modulo nn. Your task is to find the number of different fine sets.

입력

The first line of the input contains space-separated integers nn and rem\mathit{rem} (0rem<n1040 \le \mathit{rem} < n \le 10^4). The second line of the input contains a single integer TT (1T10100,00011 \le T \le 10^{100\\,000} - 1).

출력

Print the number of different fine sets. As this number can be really large, you should print it modulo prime number 998,244,353998\\,244\\,353.

힌트

In the first sample, we can include or exclude numbers 00 and 33 freely, it doesn't change the remainder. From numbers 1,2,4\\{ 1, 2, 4 \\} there are two fine sets: 2\\{ 2 \\} and 1,4\\{ 1, 4 \\}. So the answer is 222=82 \cdot 2 \cdot 2 = 8.

In the second sample, any subset of 0,1,,19\\{ 0, 1, \ldots, 19 \\} is fine, hence, the answer is 220=1,048,5762^{20} = 1\\,048\\,576.