题解列表

筛选

输入输出--1.格式控制

摘要:注意事项: 右对齐:%5d:---20  ;  左对齐:%-5d: 20--- 。参考代码:#include<stdio.h>int main(){    int a,b,c;    scanf("%……

2836 数组逆序重放 (C语言)

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

数组输出(C语言)

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

牛吃牧草问题——数学问题思路

摘要:解题思路:    设每头牛一天能吃n份量的草,原有草地有s份量的草,每天新增a份量的草。    则牛吃草的总量会等于新增的草+原有的草。        对于15头牛吃的20天的草,牛吃草总量为 15n……

1048: [编程入门]自定义函数之字符串拷贝

解题思路:注意事项:在这个示例代码中,我们使用函数来分别读入数字n、一行字符串和数字m。然后,我们使用函数将从第个字符开始的子串打印出来,并输出结果。scanfprintfm需要注意的是,在函数中,我们使用了格式化符来读取一行字符串。这会读取一行字符串中的所有可见字符,

用栈实现八进制转换

```c#include#includetypedefstructStack{intdata[100];inttop;}*Stack,stack;//入栈voidPush(StackS,intn){S->top=0;for(inti=n;i>0;i/=8){S->data[S->top]=i%8;S-

c语言 最简单

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ long long int N; scanf_s("%lld", &N); lo……

最匹配的矩阵——C语言

摘要://也可以暴力枚举a矩阵的每个大小为r*s的矩阵,其实算法复杂度都一样 #include<stdio.h> #include<math.h> #define N 100 int a[N][N]……

编写题解 1102: 明明的随机数

摘要:解题思路: 先排序再去重注意事项:参考代码:#include<stdio.h> void Srot(int* arr, int len); void Deduplication(int* arr,……

成绩排序——C语言

摘要://C语言融合部分c++头文件,提交格式为c++ #include<stdio.h> #include<string.h> #include<stdlib.h> struct S { ch……