模拟 #2911: 连续出现的字符
```#include#include#include#includeusingnamespacestd;intmain(){charstr[1010];intk;cin>>k>>str;//当k==1的时候,我们需要特殊处理,当k==1的时候,第一个字符就为答案,直接输出if(k==1){cout
连续出现的字符 看一下题 想一下想 一遍过 这种思想要掌握
摘要:解题思路:遍历该位置后面n个字符注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int n; string s;//字……
连续出现的字符(简易版)
摘要:解题思路: 遍历字符串注意事项:参考代码:#include<iostream>#include <string>using namespace std;int main(){ int k; strin……
2911: 连续出现的字符
```cpp#include#includeusingnamespacestd;intmain(){intk,s=0;charch[100000],che;cin>>k>>ch;for(inti=0;i