#P7456. [2017年杭电多校]simple counting problem
[2017年杭电多校]simple counting problem
simple counting problem
Problem Description
Given , please calculate the number of sequence which satisfies : . Output the answer module 998244353.
Input
There are several test cases, please keep reading until EOF. For each test case, the first line consists of 3 integers . The next line consists of a big integer . There are 10 test cases.
Output
For each test case, output Case #x: y, which means the the test case number and the answer.
Sample Input
2 2 1
3
Sample Output
Case #1: 5
Source
2017 Multi-University Training Contest - Team 3