我也要当学霸
我也要当学霸
全部文章
分类
题解(40)
归档
标签
去牛客网
登录
/
注册
我也要当学霸的博客
全部文章
(共40篇)
题解 | #回文对称数#
int hw(int a) { int c = 0; int d = 1; int sum = 0; d = a; for (c = 0;a!=0;) { c = a % 10; a /= 10; sum = sum * 10 + c; } if (sum...
C
2022-03-06
1
556
题解 | #水仙花数#
int e = 0; int sx(int a, int b) { int sum = 0; for (; a <= b; a++) { sum = (a / 100) * (a / 100) * (a / 100) + (a % 100 / 10) * (a % 100 / ...
C
2022-03-06
2
571
题解 | #[NOIP2015]金币#
int main() { int a, b, c; int sum = 0; int d = 0; scanf("%d", &a); for (b = 1; d < a; b++) { for (c = 0; c < b; c++) { sum +=...
C
2022-03-05
6
726
题解 | #小乐乐算多少人被请家长#
`#include <stdio.h> int main() { int n; int a; int b; int d = 0; int sum = 0; int arr[50][3] = { 0 }; scanf("%d ", &n); for (a = 0; a < ...
C
2022-03-05
0
311
题解 | #数位之和#
int main() { int a = 0; int b = 0; int c = 0; scanf("%d", &a); for (; a != 0;) { b = a % 10; a /= 10; c += b; } printf("%d\n", c)...
C
2022-03-04
19
453
题解 | #牛牛学数列2#
int main() { int a = 0; double c = 0; scanf("%d", &a); for (int b = 1; b <= a; b++) { c = 1.0 / b + c; } printf("%.6lf", c); return...
C
2022-03-04
1
338
题解 | #牛牛学数列#
int main() { int a = 0, b = 0; scanf("%d", &a); int c = a; for (; c > 0; c--) { a = c; if (a % 2 == 0) { a *= -1; } b += a; ...
C
2022-03-04
8
430
题解 | #乘法表#
int main() { int he = 0; for (int a = 1; a < 10; a++) { for (int b = 1; b <= a; b++) { he = a * b; printf("%d*%d=%2d ", b, a, he); ...
C
2022-03-04
1
264
题解 | #KiKi求质数个数#
int main() { int a = 0; int d = 0; int e = 0; for (int b =100 ; b < 1000; b++) { for (int c = 1; c <= b; c++) { if (b % c == 0) ...
C
2022-03-04
0
253
题解 | #奇偶统计#
int main() { int a = 1; int b = 0; int c = 0, d = 0; scanf("%d", &b); for (; a <= b; a++) { if (a % 2 != 0) { c++; } else if (...
C
2022-03-04
1
291
首页
上一页
1
2
3
4
下一页
末页