题解列表

筛选

1011c语言代码

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){  int m,n,a,b,c,t;  scanf("%d %d",&m,&n);  a=m,b=n;  whil……

自定义函数和宏找最大数

摘要:解题思路:注意事项:参考代码:#include <stdio.h> #include <math.h> #define MAX(x,y,z)((x>y)?((x>z)?(x):(z)):((y>z……

1012c语言代码

摘要:解题思路:注意事项:1,一定要记得初始化;2,回车键也算输入字符;参考代码:#include<stdio.h>int main(){ char a; int b=0,c=0,d=0,e=0; whil……

1013c语言代码

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int i,n,a=2,s=2,sn=0; scanf("%d",&n); fo……

1014c语言代码

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){long n,i,s=1,sn=0; scanf("%d",&n); for(i=1;i<=n;i++){ sn……

1015c语言代码

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int a,b,c,i; double sum1=1,sum2=pow(1,2)……

1.5s时间超限 深度优先搜索 c语言

摘要:解题思路:通过深度优先搜索,找到以初始字符为开头的最长数字(字符串),通过比较最长数字与当前数字得出最终结果注意事项:时间超限记得每次退格的时候把当前数字的最后一位去掉参考代码:#include <s……

1016c语言代码

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,b,c,i; for(i=100;i<1000;i++){ a=i/100; b=i/10%10……

c代码记录之数组插入处理

摘要:解题思路:思路1:逐个遍历输出,当遍历到插入的数字时,先打印该插入数字,再继续遍历输出后面的数字(只是应付这题,并未将数字插入到数组)思路2:将数字插入进数组,又有两种思路思路I:重新创建一个数组,把……