1072: 汽水瓶(简单易懂) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int n,sum; while (cin >> n) …… 题解列表 2024年12月07日 2 点赞 0 评论 329 浏览 评分:10.0
3010: 奇偶数之和(使用到for循环语句) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(int argc, char *argv[]) { int n,i; int sum1=0,sum2=0…… 题解列表 2024年12月07日 0 点赞 0 评论 289 浏览 评分:10.0
2544:N以内累加求和(使用到for循环) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(int argc, char *argv[]) { int N,i; int sum=0; sca…… 题解列表 2024年12月07日 0 点赞 0 评论 402 浏览 评分:10.0
循环的嵌套 处理 输入与输出 摘要:解题思路:通过两层循环达到输入二维数组以及输出二维数组的效果,从而达到二维数组转置的效果。注意事项:在使用printf输出时,注意目标所需要的效果,即space,换行。参考代码:#include <s…… 题解列表 2024年12月08日 1 点赞 0 评论 378 浏览 评分:10.0
编写题解 2794: 求平均年龄 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int n,sum=0; cin>>n; …… 题解列表 2024年12月08日 1 点赞 2 评论 410 浏览 评分:10.0
编写题解 1765: 循环入门练习2 摘要:解题思路:注意事项:注意这道题有两种解法参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int sum=0;for(int…… 题解列表 2024年12月08日 1 点赞 2 评论 157 浏览 评分:10.0
编写题解 2797: 最高的分数 摘要:解题思路:本题使用打擂台法解决注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ long long n;cin>>n; …… 题解列表 2024年12月08日 1 点赞 0 评论 186 浏览 评分:10.0
对角线求和 摘要:解题思路:首先,通过两个嵌套的 for 循环,从用户获取一个 3×3 的整数矩阵的值,并存储在二维数组 arr 中。然后,通过另外两个 for 循环分别计算主对角线(左上角到右下角)元…… 题解列表 2024年12月08日 5 点赞 0 评论 657 浏览 评分:10.0
6行代码解决求和训练 摘要:解题思路:注意事项:参考代码:a, b, c = map(int, input().split())A = sum(range(1, a+1)) # 计算1到a的自然数之和B = sum([i**2…… 题解列表 2024年12月08日 1 点赞 3 评论 559 浏览 评分:10.0
筛选N以内的素数c语言 摘要:参考代码:#include <stdio.h> int main() { int N,i,j; scanf("%d",&N); for(i=2;i<=N;i++) { int…… 题解列表 2024年12月08日 8 点赞 0 评论 1371 浏览 评分:10.0