牛客830289240号
牛客830289240号
全部文章
分类
题解(1)
归档
标签
去牛客网
登录
/
注册
牛客830289240号的博客
全部文章
(共30篇)
题解 | #计算某字符出现次数#
#include <math.h> #include <stdio.h> #include <string.h> int main() { char a[1000], b; int n = 0; gets(a); //printf...
2023-03-08
0
199
题解 | #字符串最后一个单词的长度#
#include "stdio.h" int main() { char a; int i = 0; while((a = getchar()) != EOF) { i += 1; if(a == ' ') i = 0; } printf("%d", i - 1); ...
2023-03-08
0
296
题解 | #水仙花数#
#include <stdio.h> #include <math.h> int isShuixianhua(int i) { int sum = pow((i % 10), 3) + pow(((i / 10) % 10), 3) + ...
2023-03-05
0
229
题解 | #数列的和#
#include <stdio.h> #include "math.h" int main() { int a[10000], b[10000], n = 0; double tmp = 0, sum = 0; while (scanf("%d %d", &a[...
2023-03-04
0
241
题解 | #扭蛋机#
#include <stdio.h> #include <stdlib.h> int main() { int n = 0, cnt = 0; scanf("%d", &n); char a[(n - 1) / 2]; //printf("n...
2023-03-03
0
209
题解 | #序列找数#
#include <stdio.h> #include <stdlib.h> int main() { int n; scanf("%d", &n); int *a = (int *)malloc(n * sizeof(int)); int ...
2023-03-02
0
216
题解 | #反转链表#
/** * struct ListNode { * int val; * struct ListNode *next; * }; */ /** * * @param pHead ListNode类 * @return(756076230) ListNode类 */ struc...
2023-03-02
0
166
题解 | #判断一个链表是否为回文结构#
/** * struct ListNode { * int val; * struct ListNode *next; * }; */ /** * * @param head ListNode类 the head * @return(756076230) bool布尔型 */ ...
2023-03-02
0
231
题解 | #单链表的排序#
/**struct ListNode {int val;struct ListNode *next;}; *//***@param head ListNode类 the head node@return(756076230) ListNode类 / struct ListNode sortInLis...
2023-02-20
0
196
计算字符串最后一个单词的长度,单词以空格隔开。
还有比我更短的C代码吗?#include "stdio.h"int main(void){ char s[5000]; while(scanf("%s", s) != EOF); printf("%d", strlen(s)); //printf("8");}
2021-03-13
0
459
首页
上一页
1
2
3
下一页
末页