【超级详细】新手小白都能看懂的解题思路 解题思路:这道题求阶乘和数不难,但是要对结果按字典序排列需要用到一点小技巧。阶乘和数就是把数字拆分成每一位后对应的阶乘等于它本身,只需要先把数字挨个拆分,然后对拆分后的数字挨个求阶乘,最后对每一个阶乘求和看是否等于原来的数它本身。以上就是阶乘和数的求解思路,怎么样,不难吧。 题解列表 2024年08月07日 1 点赞 0 评论 800 浏览 评分:9.9
1680: 数据结构-八进制数 题解 ```c#include#includetypedefstruct{intdate[101];inttop;}stack;//栈intisempty(stack*s){//判断栈是否为空returns->top==-1?0:1;}voidpush(stack*s, 题解列表 2024年08月07日 0 点赞 0 评论 691 浏览 评分:0.0
最直观的方法 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <math.h>void big(double a, double b,double c);void equal(d…… 题解列表 2024年08月06日 0 点赞 0 评论 611 浏览 评分:9.9
编写题解 1017: [编程入门]完数的判断 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int s(int n){ int ans=0; for(int i=1;i<n;i…… 题解列表 2024年08月06日 0 点赞 0 评论 780 浏览 评分:0.0
1173: 计算球体积 题解 摘要:```c #include #include int main() { double r, a = 0; while (scanf("%lf", &r) != EOF) …… 题解列表 2024年08月06日 0 点赞 0 评论 691 浏览 评分:0.0
宏定义秒了 摘要:解题思路:注意事项:宏定义的变量尽量用(),防止误运算参考代码:#include <stdio.h>#define MAX(a,b) ((a)>(b)?(a):(b))int main() { …… 题解列表 2024年08月06日 1 点赞 0 评论 447 浏览 评分:9.9
1072: 汽水瓶 包你看懂,公式解(c语言代码) ```c#includeintmain(){intn,meihe=0,he=0,count=0;//这里的变量是拼音,meihe就是没喝,he就是喝,count是负责计数的while(scanf("%d",&n)&&n!=0){//n=0不做处理meihe=n;//一开始都没喝, 题解列表 2024年08月06日 1 点赞 0 评论 513 浏览 评分:9.9
输出结果是“inf”的看过来 结果不管输入什么都是inf那是因为计算阶乘的时候,累乘的那个数如果没有初始化或者初始化为1,那个你的阶乘结果是0,那么你计算1.0/fact(i)的时候分母就是0了```c#inclu 题解列表 2024年08月06日 0 点赞 0 评论 961 浏览 评分:9.9
编写题解 1098: 陶陶摘苹果 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int i=0; …… 题解列表 2024年08月06日 0 点赞 0 评论 635 浏览 评分:9.9
1070: 二级C语言-成绩归类 2种解法(c语言代码) 摘要:使用三目运算符 ```c #include #define fun(a,b,c,date) date>=85?a++:(date>60?b++:c++) int main(){ i…… 题解列表 2024年08月06日 0 点赞 0 评论 696 浏览 评分:0.0