- Fibonacci数列
新手村的Fibonacci数列 救救孩子,只对4个,另外五个数据完全不对
- 2021-10-19 22:59:03 @
-
#include <stdio.h> int main() { long long a=1,b=1,n,i,t,F; scanf("%lld",&n); if(n<3){F=1%10007; } for(i=3;i<=n;i++) { t=a+b;F=(a+b)%10007; b=a;a=t;} printf("%lld",F); return 0; }
3 comments
-
肆静_94 LV 8 @ 2024-10-8 13:40:35
所以为什么只对四个啊
-
2021-10-19 23:51:41@
学一下Markdown标记语言
-
2021-10-19 23:02:33@
怎么把代码发的容易看啊,不会
👍 1
- 1
Information
- ID
- 38
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 8
- Tags
- # Submissions
- 2327
- Accepted
- 309
- Uploaded By