题解列表

筛选

map存储,指针遍历,简洁优雅

摘要:解题思路:map存储字符,循环遍历注意事项: 记得getchar()清空缓冲区参考代码:#include <bits/stdc++.h> #define IOS ios::sync_with_std……

1852: 求1+2+3+...+n的值

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;ll man(ll a){     ll……

2847-找第一个只出现一次的字符-数组解法

摘要:注意事项: 找到只出现一次的字符,输出第一次出现的字符。 注意题目条件:用字符型数组储存输入的小写字母,用整形数组储存26个字母的出现次数输出第一次出现的字母 ```cpp #in……

3010 奇偶数之和

摘要:解题思路:循环1到n的所有数字, 判断奇偶数,分别求和,最后输出注意事项:sum1 需要使用+= 号  参考代码:#include <bits/stdc++.h>using namespace std……

2544 N以内累加求和

摘要:解题思路:注意事项:别写错了参考代码:#include <bits/stdc++.h>using namespace std;int main(){    int sum,i,n;    sum=0;……

编写题解 2000: 偶数列举

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){    int n;    cin>>n;    for(i……