4thirteen2one
4thirteen2one
全部文章
分类
题解(37)
归档
标签
去牛客网
登录
/
注册
4thirteen2one的博客
TA的专栏
1篇文章
0人订阅
我的刷题记录
1篇文章
353人学习
全部文章
(共38篇)
题解 | #HJ73 计算日期到天数转换#
#include <stdio.h> int main() { int daysPerMonth[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; int y, m, d, s; while (scanf...
C
2022-06-19
0
358
题解 | #HJ53 杨辉三角的变形#
#include <stdio.h> int main() { int n, pos; while(scanf("%d", &n) != EOF) { if (n==1 || n==2) { pos = -1; ...
C
2022-06-18
0
367
题解 | #HJ62 查找输入整数二进制中1的个数#
#include <stdio.h> int countOnes(int x) { int ones = 0; while (x > 0) { x &= (x - 1); ones++; } return o...
C
2022-06-18
0
366
题解 | #HJ48 从单向链表中删除指定值的节点#
#include <stdio.h> #include <stdlib.h> typedef struct tLinkNode { int data; struct tLinkNode *next; } LinkNode; int main() { ...
C
2022-06-17
2
468
题解 | #AB9 【模板】链表#
C语言版本 #include <stdio.h> #include <stdlib.h> #include <stdbool.h> typedef struct tLinkNode { int data; struct tLinkNode *ne...
C
链表
2022-05-30
4
793
题解 | #AB8 【模板】循环队列#
C语言版本 #include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> typedef struct tQueue { int *data, ...
C
队列
2022-05-30
1
464
题解 | #HJ108 求最小公倍数#
C语言版本 #include <stdio.h> int gcd(int a, int b) { return (b==0)? a: gcd(b, a%b); } int lcm(int a, int b) { return a*b/gcd(a,b); } int ...
C
2022-05-27
0
847
题解 | #HJ14 字符串排序#
Python版本 n = int(input()) string_list = [] for i in range(n): string_list.append(input()) string_list.sort() for string in string_list: prin...
C
Python3
2022-05-25
8
1898
题解 | #NC61 两数之和#
C语言版本 【暴力遍历+边界过滤】 /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * @param numbers int整型一维数组 * @param numbersLen int numbers数组长度 * @param target in...
C
Python3
哈希表
2022-05-24
0
1965
题解 | #CC7 牛牛的单向链表#
#include <stdio.h> #include <stdlib.h> struct LinkNode { int value; struct LinkNode *next; }; int main() { int n; scanf(...
C
2022-05-03
3
768
首页
上一页
1
2
3
4
下一页
末页