也不容易的小白菜很怕黑
也不容易的小白菜很怕黑
全部文章
分类
归档
标签
去牛客网
登录
/
注册
也不容易的小白菜很怕黑的博客
全部文章
(共53篇)
题解 | #八进制#
//输入一个整数,将其转换成八进制数输出。 #include<stdio.h> int main() { int n; while (scanf("%d", &n) != EOF) { int a[100], i = 0; while (n...
2023-03-23
0
320
题解 | #阶乘#
//输入n, 求y1=1!+3!+...m!(m是小于等于n的最大奇数) y2=2!+4!+...p!(p是小于等于n的最大偶数)。 #include<stdio.h> int jiecheng(int n) { int i, sum = 1; for (i = 1; ...
2023-03-23
0
258
题解 | #回文字符串#
//给出一个长度不超过1000的字符串,判断它是不是回文(顺读,逆读均相同)的。 #include<stdio.h> #include<string.h> #define maxsize 1000 int main() { char str1[maxsize]; ...
2023-03-22
0
332
题解 | #字符串排序#
/** 每个字符串会少于100个字符 将这输入的该组字符串按每个字符串的长度,由小到大排序,按排序结果输出字符串。 */ #include<stdio.h> #include<string.h> void sort(char str[][300], int n) { ...
2023-03-22
0
331
题解 | #最大序列和#
#include<stdio.h> /** 给出一个整数序列S,其中有N个数,定义其中一个非空连续子序列T中所有数的和为T的“序列和”。 对于S的所有非空连续子序列T,求最大的序列和。 */ int max_num(int x, int y) { if (x > y) ...
2023-03-21
0
235
题解 | #求最大最小数#
#include<stdio.h> #define maxsize 10000 int main() { int n, i; while (scanf("%d", &n) != EOF) { int a[maxsize]; int max ...
2023-03-21
0
213
题解 | #大整数排序#
#include<stdio.h> #include<string.h> #define maxsize 1000 int main() { int n, a, b; char string[maxsize][maxsize]; char str[ma...
2023-03-20
0
281
题解 | #字母统计#
#include<stdio.h> #include <string.h> int main() { char string[300]; int count[26];//数组记录 gets(string); for (int i = 0; i ...
2023-03-19
0
245
题解 | #字符串的反码#
#include<stdio.h> #include<string.h> #define maxsize 1000 int main() { char string[maxsize]; int i; scanf("%s",string); for...
2023-03-19
0
267
题解 | #数字之和#
#include<stdio.h> int qiuhe(int n){ int sum=0; while(n!=0) //不知道n是几位数 所以使用while { sum+=n%10; n=n/10; ...
2023-03-19
0
257
首页
上一页
1
2
3
4
5
6
下一页
末页