题解列表
基于scanf输入判断的优化和补充
摘要:解题思路:使用fgets函数替换gets函数,避免缓冲区溢出。使用sscanf函数格式化输入。注意事项:1.gets函数由于它的不安全已经不在使用,因此使用fgets函数进行替换。2.在进行多个字符串……
2892: 最好的草
摘要:解题思路:注意事项:参考代码:n,m=map(int,input().strip().split())l = [list(j for j in input()) for i in range(n)]s……
编写题解 1808: [编程基础]输入输出练习之精度控制1
摘要:解题思路:常规解题思路注意事项:精度位数,中英文符号。参考代码:#include<stdio.h>main(){ float a; scanf("%f",&a); printf("%.3f",a); ……
1065: 二级C语言-最小绝对值 题解(c语言代码)
摘要:```c
#include
#include
int main() {
int arr[10] = { 0 };
for (int i = 0; i < 10; i++)……
1063: 二级C语言-统计字符 题解
摘要:```c
#include
#include
void fun(char arr[]){
int a=0,b=0,c=0,d=0,i=0;
while(arr[i]!='……
1062: 二级C语言-公约公倍 暴力枚举
摘要:```c
#include
int main() {
int n, m, temp1,temp2;
scanf("%d %d", &n, &m);
if (n > ……
1061: 二级C语言-计负均正 题解
摘要:```c
#include
int main(){
int arr[20],count=0;
float average=0.0;
for(int i=0;i0){……
1060: 二级C语言-同因查找 题解
摘要:```c
#include
int main(){
for (int i=10;i……
1051: [编程入门]结构体之成绩统计2 简洁版
摘要:```c
#include
#include
typedef struct student {
char id[100];
char name[100];
in……