羊客202
羊客202
全部文章
分类
归档
标签
去牛客网
登录
/
注册
羊客202的博客
全部文章
(共42篇)
题解 | #KiKi求质数个数#
#include <stdio.h> #include<math.h> int main() { int i = 0, j = 0, flag = 0, count = 0; for (i = 101; i < 1000; i += 2) { ...
2023-10-26
0
186
题解 | #有序序列合并#
#include <stdio.h> int main() { int n = 0, m = 0; scanf("%d%d", &n, &m); int arr1[n]; int arr2[m]; int ar...
2023-10-26
2
285
题解 | #逆序输出#
#include <stdio.h> int main() { int arr[10] = { 0 }; int i = 0; for (i = 0; i < 10; i++) { scanf("%d", &arr[i]); } for ...
2023-10-26
0
215
题解 | #空心正方形图案#
#include <stdio.h> int main() { int n = 0, i = 0, j = 0; while (scanf("%d", &n) != EOF) { int right = 2 * n - 1; /*每行元素个数*/ ...
2023-10-26
0
226
题解 | #回文对称数#
#include <stdio.h> #include<math.h> int main() { int n = 0, u = 0, i = 0, j = -1, tem1 = 0, tem2 = 0; //u是n的逆输出 scanf("%d", &a...
2023-10-23
1
247
题解 | #小乐乐算多少人被请家长#
#include <stdio.h> int main() { int n = 0, i = 0, c = 0, m = 0, e = 0, average = 0, count = 0; scanf("%d", &n); for (i = 0; i...
2023-10-22
1
195
题解 | #牛牛学数列2#
#include <stdio.h> int main() { int n = 0, i = 0; double sum = 0.0; scanf("%d", &n); //float类型变量仅精确到小数后六位,第六位可能不准确 //doubl...
2023-10-22
1
199
题解 | #魔法数字变换#
#include <stdio.h> int main() { int n = 0, count = 0; scanf("%d", &n); while (n != 1) { if (n % 2 == 0) { n /= 2; cou...
2023-10-22
1
244
题解 | #数位之和#
#include <stdio.h> int main() { int n = 0, sum = 0, tem = 0; scanf("%d", &n); while (n) { tem = n % 10; sum += tem; n /...
2023-10-22
1
205
题解 | #牛牛学数列#
#include <stdio.h> int main() { int flag = 1, i = 0, n = 0, sum = 0; scanf("%d", &n); for (i = 1; i <= n; i++) { sum = s...
2023-10-22
4
195
首页
上一页
1
2
3
4
5
下一页
末页