会排序就能做了,判断很简单 摘要:解题思路:把差的绝对值存到数组里并由小到大排好序,题目要求比较严苛,必须是1到(n-1)的排序才算正确,所以只需要判断数组中的第n-1项的值是否为n-1即可,不需要每一项都查看。注意事项:无参考代码:…… 题解列表 2025年01月25日 0 点赞 0 评论 160 浏览 评分: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 评论 414 浏览 评分:0.0
题解 2804: 与指定数字相同的数的个数 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int a,b[100],c,sum = 0; scan…… 题解列表 2025年01月25日 0 点赞 0 评论 169 浏览 评分:0.0
题解 2803: 整数的个数 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>#include<math.h>int main()…… 题解列表 2025年01月25日 0 点赞 0 评论 174 浏览 评分:0.0
题解 2802: 满足条件的数累加 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int a,b,sum = 0; scanf("…… 题解列表 2025年01月25日 0 点赞 0 评论 119 浏览 评分:0.0
题解 2801: 奇数求和 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int a,b,sum = 0; scanf("…… 题解列表 2025年01月25日 0 点赞 0 评论 304 浏览 评分:0.0
题解 2798: 整数序列的元素最大跨度值 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int a,b[1000],max,min; scanf…… 题解列表 2025年01月25日 0 点赞 0 评论 161 浏览 评分:0.0
题解 2797: 最高的分数 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int a,b[100],max=b[0]; scanf…… 题解列表 2025年01月25日 0 点赞 0 评论 221 浏览 评分:0.0
题解 2794: 求平均年龄 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int a,b[100]; float sum=0; s…… 题解列表 2025年01月25日 0 点赞 0 评论 549 浏览 评分:0.0
题解 2777: 计算2的幂 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int a,b=0; scanf("%d&qu…… 题解列表 2025年01月25日 0 点赞 0 评论 167 浏览 评分:0.0