simple counting problem

TimeLimit:1000MS  MemoryLimit:524288KB
64-bit integer IO format:%I64d
未提交 | 登录后收藏
Problem Description
Given $m, b, c, n$, please calculate the number of sequence $x_1, x_2, x_3, \dots, x_m$ which satisfies :
$0 \leq x_i\leq b ^ i - c, x_i \in \mathbb{Z}$
$\sum_{i = 1}^{m}{x_i} < n$.
Output the answer module 998244353.
$1\leq m\leq 50$
$2\leq b \leq 10^9, -b + 2 \leq c \leq b - 1$
$1\leq n< b^{m + 1}$
Input
There are several test cases, please keep reading until EOF.
For each test case, the first line consists of 3 integers $m, b, c$.
The next line consists of a big integer $n$.
There are 10 test cases.
Output
For each test case, output Case #x: y, which means the the test case number and the answer.
SampleInput
2 2 1
3
SampleOutput
Case #1: 5
Submit
题目统计信息详细
总AC数0
通过人数0
尝试人数0
总提交量0
AC率0.00%
AC该题后可以添加标签
贴完标签可以获得20ACB。
并且可以获得本题所有提交代码查看权限。
点击标题可以显示标签。
如果你还没认真思考过这题,请不要查看标签
如果您已经通过了该题,请务为该题贴上标签
出处

T^T Online Judge

[BUG反馈] [FAQ] [闽ICP备17026590号-1]
当前版本:3.24 系统时间: