AM. 矩阵加速(数列)
矩阵加速(数列)
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
题目描述
已知一个数列 ,它满足:
$$a_x= \begin{cases} 1 & x \in\{1,2,3\}\\ a_{x-1}+a_{x-3} & x \geq 4 \end{cases} $$求 数列的第 项对 取余的值。
输入格式
第一行一个整数 ,表示询问个数。
以下 行,每行一个正整数 。
输出格式
每行输出一个非负整数表示答案。
3
6
8
10
4
9
19
提示
- 对于 的数据 ;
- 对于 的数据 ;
- 对于 的数据 ,。
【A班】数学问题S
- Status
- Done
- Problem
- 62
- Open Since
- 2025-10-22 0:00
- Deadline
- 2025-11-28 23:59
- Extension
- 24 hour(s)