DP入门 # 2809: 菲波那契数列 摘要:``` // 注意这道题第一下项的下标为0,所以我们最后输出的是dp[n-1] #include #include #include #include using namespace …… 题解列表 2024年10月25日 1 点赞 0 评论 379 浏览 评分:0.0
2809:斐波那契数列 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include <math.h>int main(){ int k,f1=1,f2=1,f3; scanf(&…… 题解列表 2025年11月13日 1 点赞 0 评论 191 浏览 评分:0.0
菲波那契数列(菜鸟解题) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ long long a[100000]; int n; scanf("%d",&n); …… 题解列表 2022年11月28日 0 点赞 0 评论 536 浏览 评分:0.0
建立数组,预设前两项,定义数组构成 摘要:解题思路:建立数组,预设前两项,定义数组的构成。注意事项:输出第k位数,对应的索引是k-1。参考代码:#include<iostream>using namespace std;int main(){…… 题解列表 2024年12月02日 0 点赞 0 评论 511 浏览 评分:0.0
题解 2809: 菲波那契数列 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int f(int k){ if(k==1||k==2) { return 1; } return f(k-1)+f(k-…… 题解列表 2025年01月25日 0 点赞 0 评论 545 浏览 评分:0.0
2025/7/28刷题记录 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int num ; scanf("%d…… 题解列表 2025年07月28日 0 点赞 0 评论 141 浏览 评分:0.0
2809: 菲波那契数列 摘要:#include<bits/stdc++.h>using namespace std;int main(){ int i,n,a=1,b=1,c=1;…… 题解列表 2025年10月15日 0 点赞 0 评论 137 浏览 评分:0.0
2809斐波那契数列 摘要:解题思路:第一、二项为1,后面的每个数是前两项之和注意事项:循环次数为n-2次参考代码:int main(){ int n,i,a1=1,a2=1,a3; &nb…… 题解列表 2025年10月17日 0 点赞 0 评论 220 浏览 评分:0.0
c++加注释版 摘要:#include <iostream>using namespace std;int main() { int k; cin >> k; if (k == 1 || k == …… 题解列表 2025年11月02日 0 点赞 0 评论 95 浏览 评分:0.0