165男生的逆袭
165男生的逆袭
全部文章
分类
归档
标签
去牛客网
登录
/
注册
165男生的逆袭的博客
TA的专栏
62篇文章
0人订阅
算法学习篇:新手入门130
62篇文章
20人学习
全部文章
(共62篇)
题解 | 牛牛学数列2
来自专栏
#include <stdio.h> int main() { int n; //int arr[1000] = {0}; scanf("%d", &n); float ret = 0; //注用int会使精度缺失 for (float i = ...
2025-10-13
0
17
题解 | 牛牛学数列
来自专栏
#include <stdio.h> int add(int x) { int ret = 0; if (x == 1) return 1; int sign = (x % 2 == 0) ? -1 : 1; ret =sign*x + add(x - 1); retur...
2025-10-13
0
12
题解 | 素数判断
来自专栏
#include <stdio.h> #include<stdbool.h> //素数判断 bool isPrime(int n) { if (n <= 1) { return 0; } if (n ==2) { return 1; } //偶数都...
2025-10-13
0
18
题解 | 多组数据a+b III
来自专栏
#include <stdio.h> #include <stdlib.h> #define MAX_SIZE 1000 int main() { int a, b; int* results = (int*)malloc(MAX_SIZE * sizeo...
2025-10-13
1
14
题解 | 多组输入a+b II
来自专栏
#include <stdio.h> int main() { int arr[100] = { 0 }; int T; int a, b; scanf("%d", &T); for (int i = 0; i < T; i++) { ...
2025-10-13
0
15
题解 | 环形链表的约瑟夫问题
来自专栏
/** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param n int整型 * @param m int整型 * @return int整型 */ typedef struct ListNode ListNode; List...
2025-10-12
1
14
题解 | 四季
来自专栏
#include <stdio.h> int main() { int n; scanf("%d", &n); int month = n % 100; if (month >= 3 && month <= 5) { ...
2025-10-12
0
11
题解 | 最大最小值
来自专栏
#include <stdio.h> int main() { int max, min; int arr[3]; for (int i = 0; i < 3; i++) { scanf("%d", &arr[i]); } max = ...
2025-10-12
0
12
题解 | 牛牛是否被叫家长
来自专栏
#include <stdio.h> int main() { int n, m, k; int ret; scanf("%d %d %d", &n, &m, &k); ret = (n + m + k) / 3; if (ret ...
2025-10-12
0
12
题解 | 牛妹数
来自专栏
#include <stdio.h> int main() { int n; while (scanf("%d", &n)!=EOF) { if (n % 2 == 0 && n > 50) { printf(&qu...
2025-10-12
0
12
首页
上一页
1
2
3
4
5
6
7
下一页
末页