蛇形矩阵(java利用for循环) 摘要:解题思路:以n=5为例:第一行第一个数是1每一行的第一个数与前一行的第一个数依次大1,2,3,4由此我们可以推出每一行的第一个数第一行前一个数和后一个数依次相差2,3,4,5第二行前一个数和后一个数依…… 题解列表 2023年02月21日 0 点赞 0 评论 168 浏览 评分:9.9
2816: 统计满足条件的4位数个数 摘要:解题思路:注意事项:参考代码:s = 0 n = int(input()) l = list(map(int,input().split())) for i in l: a = i %…… 题解列表 2023年02月21日 0 点赞 0 评论 364 浏览 评分:9.9
高斯求和 (c++代码) 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int n;int main(){ cin>>n; int s=(1+n)*n/2;…… 题解列表 2023年02月22日 0 点赞 0 评论 329 浏览 评分:9.9
两种方法,简单易懂!!!! 摘要:解题思路:注意事项:数组可以不开那么大。参考代码:#include<bits/stdc++.h>using namespace std;//int a,b,c;int n,a[101][101],s,…… 题解列表 2023年02月22日 0 点赞 0 评论 390 浏览 评分:9.9
求和很简单,只要掌握方法就可以 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int n,m,s=0;//s要赋初值!!! cin>>n>…… 题解列表 2023年02月22日 0 点赞 0 评论 431 浏览 评分:9.9
1045: [编程入门]自定义函数之整数处理 摘要:```cpp #include using namespace std; /* 题目描述 输入10个整数,将其中最小的数与第一个数对换,把最大的数与最后一个数对换。 写三个函数; ①输入…… 题解列表 2023年02月22日 0 点赞 1 评论 234 浏览 评分:9.9
@更向天涯 小李子不行啊!!! 摘要:解题思路:注意事项:cin、cout一定要改成scanf和printf不然会超时!!!!参考代码:#include<bits/stdc++.h>using namespace std;int a[10…… 题解列表 2023年02月22日 0 点赞 6 评论 272 浏览 评分:9.9
2864: 单词替换 STL版 摘要:解题思路:注意事项:参考代码:#include <iostream> #include <sstream> // #include <cstdio> // #include <algorithm…… 题解列表 2023年02月22日 0 点赞 0 评论 258 浏览 评分:9.9
我觉得比楼上写的还简单^_^ 摘要:解题思路:注意事项:参考代码:#include <iostream> // #include <sstream> // #include <cstdio> // #include <algori…… 题解列表 2023年02月22日 0 点赞 1 评论 273 浏览 评分:9.9
记录相同字符的必会想法 摘要:解题思路:字符串有空格 用getline输入 然后统计相同字符的个数 比较一下注意事项:这里大小写忽略 统一一下即可参考代码:#include<bits/stdc++.h>using namespac…… 题解列表 2023年02月22日 0 点赞 0 评论 496 浏览 评分:9.9