题解列表

筛选

1-a的和,1-b的2次幂

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){    double a,b,c,sum=0,i;    scanf("%lf%lf%lf",&a,&b,&c);……

3154 字符简写(新手上路,求大佬指正)(动态规划)

摘要:解题思路:对于输入的数据我们只需要辨别是否是字符c1和c2。对一个符合题目要求的子串来说,结尾一定是c2字符,开头为c1字符。因此只需要将每个c2字符前c1字符的个数相加即可。同时子串有长度n的限制,……

C语言温度转换

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int ctof(int c){    return (32+c*9/5);}int main(){int c=-100,f;while……

自由下落的距离计算

摘要:解题思路:因为第一次和其他不一样把第一次拿出来算,然后求反弹的距离,反弹的距离就是落下的距离注意事项:这个有不足的地方,没有报错的情况参考代码:#include<stdio.h>int main(){……

C语言 自定义函数

摘要:解题思路:注意事项:参考代码:#include<stdio.h>double fact(int n)//计算n的阶乘{ double m = 1.0; for (int i = 1; i <= n; ……

最小绝对值 数组

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i,max,min;//最大和最小数的下标 int arr[10];//求完绝对值的数组 int arr……

1094: 字符串的输入输出处理

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i;  scanf("%d",&i);  getchar();  char a[100];  for(i……

1095: The 3n + 1 problem

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int f(int n){ int i=1;  while(n!=1)  { if(n%2==0)    n=n/2;    else ……

数组插入处理

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){    int i, j, n, temp, a;    int arr[10];     int add[10]……