题解列表

筛选

可以稍微少打一些代码

摘要:解题思路:注意事项:不要忘记switch语句的花括号参考代码:#include<stdio.h>int main(){    int a;    scanf("%d",&a);    switch(a……

最普通的解题方法

摘要:解题思路:注意事项:注意将条件考虑完整参考代码:#include<stdio.h>int main(){    int a,b;    scanf("%d %d",&a,&b);    if(0<=a……

看不懂直接喷我

摘要:解题思路:注意事项: 看我评论!!!!!参考代码: #include #include int main() { int i; char a[300]; gets (a); int num=strle……

The 3n + 1 problem,goto真好用!

摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; int main(){     // 定义变量a, b, c和数组d,l用……

哥德巴赫猜想做题心得

摘要:解题思路:对称求和以及对素数的判断注意事项:这里我们需要理解题目的目的-输入n是偶数,这使得我们的循环是对称的(既(2-n)这个区间) 所以头尾相加可求得n 此时对题目的理解转变成判断首位数字是否同时……