用户输出
25646167
系统信息
Exited with return code 0
编号 | 题目 | 状态 | 分数 | 总时间 | 内存 | 代码 / 答案文件 | 提交者 | 提交时间 |
---|---|---|---|---|---|---|---|---|
#69595 | #110. czq的模法数列 | Accepted | 100 | 229 ms | 2848 K | Python 3 / 154 B | yyf_0404 | 2022-06-12 21:04:40 |
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