Scott7
Scott7
全部文章
分类
归档
标签
去牛客网
登录
/
注册
Scott7的博客
全部文章
(共4篇)
题解 | 牛牛学数列
#include <stdio.h> int main() { int n; scanf("%d", &n); int Sn; if (n % 2 == 0) { Sn = -n / 2; } el...
2026-04-11
0
14
题解 | 牛牛学数列4
#include <stdio.h> int main() { int n; scanf("%d", &n); int ret = n * (n + 1) * (n + 2) / 6; printf("%d\n&q...
2026-04-09
0
22
题解 | 牛牛学数列4
#include <stdio.h> int main() { int n; scanf("%d", &n); int total = 0; int term = 0; //用于存储当前项 for (int i = ...
2026-04-09
0
20
题解 | 牛牛学数列4
#include <stdio.h> //计算第m个三角数 int tri(int m) { if (m == 1) { return 1; } else if (m >= 2) { return tri(m - 1) + m; ...
2026-04-09
0
19