1221: 数列问题 摘要: n=int(input()) f=[0]*(n+1) f[1]=3 f[2]=4 f[3]=5 for i in range(4,n+1): …… 题解列表 2021年10月12日 0 点赞 0 评论 421 浏览 评分:0.0
题解-斐波纳契数列 摘要:解题思路:根据f[i]=f[i-1]+f[i-2]规律不断迭代 注意事项:初始条件,n=1需要单独考虑 参考代码: n=int(input()) f=[0]*n if n==1: …… 题解列表 2021年10月12日 0 点赞 0 评论 579 浏览 评分:0.0
编写题解 1065: 二级C语言-最小绝对值 正确答案 摘要:解题思路:4次循环进行分析注意事项:参考代码:#include<stdio.h> #include<math.h> int main(){ int a,b,c,d,e,h,i; …… 题解列表 2021年10月12日 0 点赞 5 评论 1342 浏览 评分:9.9
题解 1033: [编程入门]自定义函数之字符提取 摘要:#include<stdio.h> #include<string.h> int main() { int i,j=0,a_length; char a[100],b[1…… 题解列表 2021年10月11日 0 点赞 2 评论 430 浏览 评分:9.3
看看#define是多么强大的存在 摘要:解题思路:1、题目要求输出一个自然数,所以找到一个就可以结束程序。2、由于题目给出的条件很多,为了方便修改和维护,所以想到了#define注意事项:1、使用#define要做到勤用括号(),多用括号代…… 题解列表 2021年10月11日 0 点赞 0 评论 412 浏览 评分:0.0
计算1~N之间所有奇数之和 摘要:解题思路:从1到N判断每一个数如果为奇数,累加如果为偶数,跳过参考代码:#include"iostream" using namespace std; int ans = 0; bool che…… 题解列表 2021年10月11日 0 点赞 0 评论 1005 浏览 评分:9.9
自由下落的距离计算 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ double M,a,c,d; double b=0; int N; scanf("%l…… 题解列表 2021年10月11日 0 点赞 0 评论 426 浏览 评分:0.0
最小公倍数 = a*b/最大公约数 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int s; int a; int b; int k,m; scanf("%d%d",&a,&b); m=a,k…… 题解列表 2021年10月11日 0 点赞 0 评论 538 浏览 评分:0.0
编写题解 1093: 字符逆序 基础解法 摘要:解题思路:正常解法注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ int b,c,d,n; char a[100]; gets(a);…… 题解列表 2021年10月11日 0 点赞 0 评论 717 浏览 评分:9.9
数据结构单链表的使用 摘要:解题思路:注意事项:参考代码:#include "stdio.h"#include<stdlib.h>typedef int Elemtype;typedef struct LNode //结构定义{…… 题解列表 2021年10月11日 0 点赞 0 评论 588 浏览 评分:0.0