题解列表

筛选

C语言字符串反转(全网最短了)

摘要:解题思路:简单粗暴直接反转注意事项:从len-1开始反循环遍历参考代码:#include<stdio.h>#include<string.h>int main(){    char a[1000]; ……

利润计算 -编译通过无误

摘要:解题思路:按照题目意思逐步写代码即可注意事项:参考代码:#include<stdio.h>int main(){ int n,m;//n为利润,m为应发奖金 scanf("%d",&n); if(n<……

找规律再求和

摘要:解题思路:发现他跟斐波那契数列有关,先斐波那契数列再调用注意事项:参考代码:#include<stdio.h>int fabonacia(int n){ if(n==1||n==2) return 1……

c++计算圆周率代码

摘要:解题思路:利用迭代法计算圆周率注意事项:注意精度参考代码:#include<iostream>#include<iomanip>using namespace std;int main() { dou……

1124:大小写问题 C语言

摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <string.h>int main(){ char a[101]; int len; gets(a); len=s……

直接暴力出奇迹

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){     int i;     for(i=1;i<=2000;i++) //1993符合,到2000就合适了  ……

剪刀石头布

摘要:解题思路:利用if进行枚举,其余情况输出0注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){     int a,b;  ……

模拟计算器

摘要:解题思路:使用switch而不是if注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){     int a,b;     ……

暴力求解法

摘要:解题思路:    把题目分割成为三个问题,先求位数,再求每个权位上的数,然后正序带空格输出,逆序输出,暴力简单。注意事项:注意求解每个权位上的数通用公式是:每个权位上的数=该数/位数%10;参考代码:……