设置三个变量即可无需数组 摘要:```java import java.util.Scanner; public class Main { public static void main(String[] args)…… 题解列表 2023年10月11日 0 点赞 0 评论 248 浏览 评分:0.0
菲波那契数列(数组) 摘要:参考代码: ```c #include int main() { int k; scanf("%d",&k); int a[k]; for(int i=0;i…… 题解列表 2023年09月08日 0 点赞 0 评论 321 浏览 评分:0.0
菲波那契数列 摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;int main(){ int k, a = 1, b = 1, c = 1; …… 题解列表 2023年07月12日 0 点赞 0 评论 382 浏览 评分:0.0
2025/7/28刷题记录 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int num ; scanf("%d…… 题解列表 2025年07月28日 0 点赞 0 评论 102 浏览 评分:0.0
菲波那契数列(菜鸟解题) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ long long a[100000]; int n; scanf("%d",&n); …… 题解列表 2022年11月28日 0 点赞 0 评论 505 浏览 评分:0.0
2809:简便的算法求第N项斐波那契数列-《C语言》 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int main() { long long f1 = 1,f2 = 1,f3; int i = 0; int …… 题解列表 2022年12月20日 0 点赞 0 评论 303 浏览 评分:0.0
2809斐波那契数列 摘要:解题思路:第一、二项为1,后面的每个数是前两项之和注意事项:循环次数为n-2次参考代码:int main(){ int n,i,a1=1,a2=1,a3; &nb…… 题解列表 2025年10月17日 0 点赞 0 评论 144 浏览 评分: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 评论 84 浏览 评分: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 评论 520 浏览 评分:0.0
建立数组,预设前两项,定义数组构成 摘要:解题思路:建立数组,预设前两项,定义数组的构成。注意事项:输出第k位数,对应的索引是k-1。参考代码:#include<iostream>using namespace std;int main(){…… 题解列表 2024年12月02日 0 点赞 0 评论 485 浏览 评分:0.0