D. Fibonacci数列
Fibonacci数列
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.
Description
Fibonacci数列的递推公式为:
已知:
Format
Input
输入包含一个整数n。(1<=n<=10000000)
Output
输出一行,包含一个整数,表示除以10007的余数。
Samples
10
55
hint
在本题中,答案是要求除以10007的余数,因此我们只要能算出这个余数即可,而不需要先计算出的准确值,再将计算的结果除以10007取余数,直接计算余数往往比先算出原数再取余简单。
Limitation
1s, 1024KiB for each test case.
第七届SWPU-ACM新生预选赛
- Status
- Done
- Rule
- ACM/ICPC
- Problem
- 103
- Start at
- 2022-9-19 14:00
- End at
- 2022-10-28 14:00
- Duration
- 936 hour(s)
- Host
- Partic.
- 58