题解列表

筛选

python : 暴力解题,非常简单,初学者友好

解题思路:注意事项:我是Python初学者,我的C语言思维比较严重!!!参考代码:c=int(input())n=0ko=[]//我把这个空列表当C语言数组使用了forkinrange(2,10):ifc%k==0:ko.append(k)n+=1ifn==0:print("none")else:pr

C++简单解法

摘要:解题思路:属于基础题目注意事项:参考代码:#include<iostream>using namespace std;int main(void){ i……

C++简单解法

解题思路:属于基础题目注意事项:注意不能写if(a<60||b<60),这样写不仅仅有一科不及格时会输出1,两科都不及格时也会输出1.参考代码:#includeusingnamespacestd;intmain(void){inta,

C++简单解法

摘要:解题思路:属于基础题目,我写的是一般的写法,一个一个情况的筛选,可能会比较麻烦注意事项:参考代码:#include<iostream>using namespace……

C++简单解法

摘要:解题思路:属于基础题目注意事项:参考代码:#include<iostream>using namespace std;int main(void){ i……

C++ : map容器的超简单使用方法

解题思路:注意事项:把map容器当成正常的数组使用,区别就是内存空间可以变化,存储元素多少取决于我们需要多少我的解决这题的方法可能比较弯弯绕绕,没有那么直接参考代码:#include#includeusingnamespacestd;intmain(

最大质因数(两种题型)

摘要:1.原题目的题解:```cpp#includeusing namespace std;// 计算一个数的最大质因数int maxPrimeFactor(int x) { ……