题解列表

筛选

用筛法求之N内的素数。

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int n,a[1000005];int main(){ cin>>n; for(i……

二级C语言-阶乘数列

摘要:解题思路:用计算机算出答案,再输出注意事项:没有参考代码:#include<bits/stdc++.h>using namespace std;int main(){ cout<<"2.74e+32"……

二级C语言-统计字符

摘要:解题思路:暴力注意事项:没有参考代码:#include<bits/stdc++.h>using namespace std;string s;long long yw,kg,sz,qt;int mai……

三个数找最大值

摘要:解题思路:利用max快速找最大值注意事项:max的格式是max(a,b);参考代码:#include<bits/stdc++.h>using namespace std;int a,b,c;int m……

三个数字的排序

摘要:解题思路:利用数组+sort进行排序注意事项:注意数组的下标参考代码:#include<iostream>#include<fstream>#include<algorithm>using names……

二级C语言-等差数列

摘要:解题思路:直接模拟注意事项:要用long long参考代码:#include<bits/stdc++.h>using namespace std;long long n,s,t=2;int main(……

三个字符串的排序

摘要:解题思路:直接用short注意事项:没有参考代码:#include<bits/stdc++.h>using namespace std;string s[8];int main(){    for(i……

使用STL set容器进行解题

摘要:解题思路:先定义一个整型数组,从键盘赋值,然后再插入到set容器中,set 本身就可以达到去重,而且默认升序注意事项:参考代码:    #include<iostream>#include<set>i……