斐波那契数列的规律
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.
Background
Special for beginners, ^_^
Description
东东最近在研究广义斐波那契数列,已知 ,定义长度为 的数列 ,其中
,
当 , 有 。
如 时,
他在研究其中数字出现的频率。
定义 。 mod为 求余数操作。
如 5 mod 3 = 2; 19 mod 4 = 3; 20 mod 4 = 0.
有 个问题, 每个问题给出一个范围 和一个数值 , 问 之间有多少个。
Format
Input
第一行五个正整数 。 接下来行,每行三个正整数 ,表示问题。
Output
行,每行一个答案,表示 之间有多少个。
Samples
7 1 2 3 3
1 7 0
1 7 1
1 7 2
2
3
2
Limitation
30%
另有30%
100% ,
初一A随堂练习
- Status
- Done
- Rule
- IOI
- Problem
- 6
- Start at
- 2025-9-19 10:30
- End at
- 2025-9-19 12:30
- Duration
- 2 hour(s)
- Host
- Partic.
- 29