养条鱼
养条鱼
全部文章
分类
归档
标签
去牛客网
登录
/
注册
养条鱼的博客
全部文章
(共8篇)
题解 | #反转链表#
/** * struct ListNode { * int val; * struct ListNode *next; * }; */ /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param head ListNode类 ...
2023-11-09
2
235
题解 | #计算日期到天数转换#
#include <iostream> using namespace std; int main() { int year, month, day; int i = 0; int sum = 0; while ( cin >> year &...
2023-11-08
2
222
题解 | #求1+2+3+...+n#
class Sum { public: Sum() { sum += i; //每一次调用都会和之前的相加起来,因为两个变量被static修饰了, ++i; } static void Init() { ...
2023-11-05
2
270
题解 | #整数的个位#
#include <stdio.h> int main() { int a; scanf("%d",&a); printf("%d",a / 1 % 10); return 0; } //知识点 a / 权位 % 10 //权位就是控制打印那个...
2022-11-01
4
344
题解 | #十六进制转十进制#
#include <stdio.h> int main() { #include <stdio.h> int i = 0xABCDEF; printf("%15d\n", i); retur...
C
2022-10-25
3
286
题解 | #缩短二进制#
#include <stdio.h> int main() { int a = 1234; int b = 12...
C
2022-10-24
3
514
题解 | #有容乃大#
#include <stdio.h> int main() { int s = sizeof(short); int i ...
C
2022-10-24
2
245
题解 | #牛牛的第二个整数#
#include <stdio.h> int main() { int b =0; int ...
C
2022-10-23
3
374