用户输出
25646167
系统信息
Exited with return code 0
编号 | 题目 | 状态 | 分数 | 总时间 | 内存 | 代码 / 答案文件 | 提交者 | 提交时间 |
---|---|---|---|---|---|---|---|---|
#100828 | #110. czq的模法数列 | Accepted | 100 | 272 ms | 2848 K | Python 3 / 154 B | ssh | 2023-10-24 8:57:44 |
a, b, mod = map(int, input().split())
ans, t = [0, 1]
for i in range(a):
ans = (ans + t + mod) % mod
t = (t * b % mod + mod) % mod
print(ans)
用户输出
192041748
系统信息
Exited with return code 0
用户输出
917164423
系统信息
Exited with return code 0
用户输出
626438667
系统信息
Exited with return code 0