牛客830289240号
牛客830289240号
全部文章
分类
题解(1)
归档
标签
去牛客网
登录
/
注册
牛客830289240号的博客
全部文章
(共30篇)
题解 | 求int型正整数在内存中存储时1的个数
#include <stdio.h> int main() { int a, b = 0; while (scanf("%d", &a) != EOF) { // 注意 while 处理多个 case while(a) ...
2025-03-12
0
23
题解 | 字符串分隔
#include <stdio.h> int main() { char s[101]; int n = 0; while (scanf("%s", s) != EOF) { while(s[n++] != '\0') ...
2025-02-18
0
44
题解 | 取近似值
#include <stdio.h> int main() { float a = 0; int b = 0, c = 0; while (scanf("%f", &a) != EOF) { b = (int)((a ...
2025-02-13
0
37
题解 | 明明的随机数
#include <stdio.h> #include <stdlib.h> #include <string.h> int main() { int a, b, n = 0, d[501]; memset(d, 0, sizeof(d)); ...
2025-02-13
0
29
题解 | 计算某字符出现次数
#include <string.h> #include <stdio.h> int main(void) { char a[1000], b,c; char notspace = 1; int n = 0, cnt = 0; while ((...
2025-02-13
0
41
题解 | #字符串反转#
#include <stdio.h> #include <string.h> int main() { char str[1002]; while (scanf("%s", str) != EOF) { // 注意 while 处理多个 case ...
2023-04-12
0
239
题解 | #质数因子#
#include <stdio.h> int main() { int a; scanf("%d", &a); int i; for (i = 2; i * i <= a; i++) { while (a % i == 0...
2023-04-10
0
193
题解 | #判断链表中是否有环#
#include <stdbool.h> /** * struct ListNode { * int val; * struct ListNode *next; * }; */ /** * * @param head ListNode类 * @return bool...
2023-04-05
0
162
题解 | #合并两个排序的链表#
/** * struct ListNode { * int val; * struct ListNode *next; * }; */ /** * * @param pHead1 ListNode类 * @param pHead2 ListNode类 * @return L...
2023-03-31
0
196
题解 | #密码验证合格程序#
#include <stdio.h> int main() { char a[100]; while (scanf("%s", a) != EOF) { int num, i, j, x=0, y=0, z=0, w=0, cnt = 0, flag =...
2023-03-31
0
229
首页
上一页
1
2
3
下一页
末页