题解 1141: C语言训练-百钱百鸡问题 暴力破解法是指从可能的解集合(空间)中一一列举各情况,用题目给定的检验条件判定哪些是没用的,哪些是有用的。能使命题成立的值,即为问题的解。基本思路:(1)确定问题的可能解的范围(可能解的空间)。(2)逐一列出可能解集合中的元素,验证是否是问题的解。 题解列表 2024年01月18日 0 点赞 0 评论 566 浏览 评分:9.9
题解 1014: [编程入门]阶乘求和 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ long long n,sn=0,sum=1; …… 题解列表 2024年01月18日 1 点赞 0 评论 427 浏览 评分:9.9
题解 1120: C语言训练-"水仙花数"问题2 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ for(int i=100; i<=999; i++…… 题解列表 2024年01月18日 0 点赞 0 评论 424 浏览 评分:9.9
题解 1120: C语言训练-"水仙花数"问题2 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int a,b,c ; int x,y,z ; …… 题解列表 2024年01月18日 0 点赞 0 评论 563 浏览 评分:9.9
C语言训练-百钱百鸡问题 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ for(int x=0;x<=20;x++) …… 题解列表 2024年01月18日 0 点赞 0 评论 352 浏览 评分:0.0
题解 1141: C语言训练-百钱百鸡问题 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ for(int x=0;x<=20;x++) …… 题解列表 2024年01月18日 0 点赞 0 评论 395 浏览 评分:9.9
蛮力法求解素数 解题思路:素数是除了能被1和本身整除,其余数都不能整除的数可通过蛮力法和循环求解此题外部循环拿到从2~a的所有数(a为用户输入的数)内部循环拿到从2~a-1的所有数用外部循环拿到的数逐一取模内部循环拿到的数,若结果均不为0,即代表此数是素数注意事项:使用此方法时需要用到布尔类型, 题解列表 2024年01月18日 0 点赞 0 评论 558 浏览 评分:0.0
2831: 画矩形 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ long long a,b,d; char c…… 题解列表 2024年01月18日 0 点赞 0 评论 449 浏览 评分:9.9
c代码记录之下一天日期--水题 摘要:```c #include int main() { int y,m,d; scanf("%d-%d-%d",&y,&m,&d); if(d==31&&m==12)…… 题解列表 2024年01月18日 0 点赞 0 评论 499 浏览 评分:0.0
题解 2836: 数组逆序重放 摘要:解题思路:注意事项:参考代码:#include <iostream> using namespace std; const int N = 110; int arr[N]; int main(…… 题解列表 2024年01月18日 0 点赞 0 评论 480 浏览 评分:0.0