编写题解 2810: 鸡尾酒疗法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n=0; scanf("%d&…… 题解列表 2025年12月25日 0 点赞 0 评论 14 浏览 评分:0.0
C语言训练-计算1~N之间所有奇数之和 摘要:解题思路:便利1~n中所有数,用i%2==1筛选所有奇数,再累加到总和注意事项:sum初值为0参考代码:#include<stdio.h>int main(){ …… 题解列表 2025年12月25日 0 点赞 0 评论 14 浏览 评分:0.0
循环实现斐波那契数列or递归函数 摘要:解题思路:注意事项:参考代码:方法一:循环(推荐)#include<stdio.h>int main(){ int k; scanf("%d",&k); lon…… 题解列表 2025年12月24日 0 点赞 0 评论 16 浏览 评分:0.0
2845: 求10000以内n的阶乘 摘要:解题思路:用字符串或者数组都可以,但我觉得数组更好理解,虽然大部分同学都是用字符串写的。注意事项:直接看代码注释,主要注意处理进位问题和前导0,其他的和普通阶乘没什么区别参考代码:#include &…… 题解列表 2025年12月24日 1 点赞 0 评论 13 浏览 评分:10.0
C语言最详解之程序员买房子 摘要:解题思路:核心逻辑:逐年模拟与判断循环限制:year < 20保证最多模拟 20 年,符合题目要求;年薪积累:每年先执行savings += N,表示第year年结束后,程序员积攒了…… 题解列表 2025年12月24日 0 点赞 0 评论 15 浏览 评分:0.0
数的计数(Noip2001) 摘要:#include <stdio.h>int main() { int n; scanf("%d", &n);…… 题解列表 2025年12月24日 0 点赞 0 评论 12 浏览 评分:0.0
3030: 全排列 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>char str[10];char res[10];int used[10]…… 题解列表 2025年12月24日 0 点赞 0 评论 9 浏览 评分:0.0
获取n个斐波那契数列 摘要:解题思路:通过for循环来达到只获取n个斐波那契数列注意事项:参考代码:#include<stdio.h>#define N 40int fblq(int x){ …… 题解列表 2025年12月24日 0 点赞 0 评论 9 浏览 评分:0.0
循环累乘法实现复利 摘要:解题思路:注意事项:百分数要转换成小数参考代码:#include<stdio.h>#include<math.h>int main(){ int R=0,M=0,Y=0; sc…… 题解列表 2025年12月24日 0 点赞 0 评论 5 浏览 评分:0.0
pow函数实现复利增长公式 摘要:解题思路:注意事项:Pn = P0 * (1 + r) ^ n(复利增长公式)参考代码:#include<stdio.h>#include<math.h>int main(){…… 题解列表 2025年12月24日 0 点赞 0 评论 6 浏览 评分:0.0