题解列表

筛选

亲和数(判约数的基本功)

摘要:解题思路:因为要判断是否约数,所以要使用暴力搜索(其实就是for循环)来查找,找到了就累加,再判断是否与输入的两个数相等。注意事项:1.计数器要清零 2.题目说了“不包含本身”,所以不能执行到这个数,……

[编程入门]数字的处理与判断c++

摘要:解题思路:分别求出它是几位数,输出每一位数字,按逆序输出各位数字注意事项:顺序不要混了参考代码:#include<iostream>#include<fstream>#include<algorith……

1670: 拆分位数

摘要:解题思路:注意事项://合理运用%和/参考代码:#include<iostream>#include<fstream>#include<algorithm>using namespace std;lo……

1671: 小九九

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;long long a;int main(){ for(int i=1;i<=9;i……

1671: 小九九

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;long long a;int main(){ for(int i=1;i<=9;i……

二级C语言-计负均正

摘要:解题思路:模拟注意事项:要用double参考代码:#include<bits/stdc++.h>using namespace std;long long a,fs;double zs,zh;int ……