利用递归函数来求阶乘 摘要:解题思路:先定义一个函数,用递归思想求一个数的阶乘,再用for循环求1~30的每个数的阶乘,最后注意%.2e表示科学计数法并且保留两位小数注意事项:参考代码:def func(x): if x=…… 题解列表 2022年05月02日 0 点赞 0 评论 739 浏览 评分:0.0
C++ 最小绝对值 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cmath>using namespace std;int main(){ int a[10], i = 0, te…… 题解列表 2022年05月02日 0 点赞 0 评论 735 浏览 评分:0.0
1024: [编程入门]矩阵对角线求和 摘要:解题思路:注意事项:小弟代码先奉上为敬: a = list(map(int,input().split()))b = list(map(i…… 题解列表 2022年05月02日 0 点赞 0 评论 1269 浏览 评分:9.9
1000: [竞赛入门]简单的a+b c++代码题解 摘要:解题思路:用iostream资源库和cstdio资源库都可解题注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a,…… 题解列表 2022年05月02日 0 点赞 0 评论 1704 浏览 评分:9.9
小白也能懂的入门代码 摘要:解题思路:注意事项:参考代码:for i in range(100,1000): a,b,c=str(i) if int(a)**3+int(b)**3+int(c)**3==int(i)…… 题解列表 2022年05月02日 0 点赞 0 评论 628 浏览 评分:8.7
排队打水c++版 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<algorithm>#include<cstring>using namespace std;const int …… 题解列表 2022年05月02日 0 点赞 0 评论 862 浏览 评分:9.0
同因查找 题解 摘要:解题思路:这题题就相识与韩信点兵!暴力判断!注意事项:要换行!参考代码:#include<bits/stdc++.h>using namespace std;int main(){ for(in…… 题解列表 2022年05月02日 0 点赞 0 评论 602 浏览 评分:9.9
猴子吃桃的问题 摘要:解题思路:求原来的桃子数,这题也就是逆推法。注意事项:s初始值为1。参考代码:#include<bits/stdc++.h>using namespace std;int n,s=1;int main…… 题解列表 2022年05月02日 0 点赞 0 评论 480 浏览 评分:0.0
温度转换 题解 摘要:解题思路:直接套公式!注意事项:无。参考代码:#include<bits/stdc++.h>using namespace std;double f;int main(){ scanf("%l…… 题解列表 2022年05月02日 0 点赞 0 评论 594 浏览 评分:0.0
公约公倍 题解 摘要:解题思路:这题就是求两个数的最大公约数和最小公倍数。我就直接用函数做!注意事项:在调用函数前别忘了加上“__”!参考代码:#include<bits/stdc++.h>using namespace …… 题解列表 2022年05月02日 0 点赞 0 评论 580 浏览 评分:0.0