| 记录编号 | 357580 | 评测结果 | AAAAA | ||
|---|---|---|---|---|---|
| 题目名称 | 2061.连续出现的字符 | 最终得分 | 100 | ||
| 用户昵称 | 是否通过 | 通过 | |||
| 代码语言 | C++ | 运行时间 | 0.001 s | ||
| 提交时间 | 2016-12-11 16:18:47 | 内存使用 | 0.29 MiB | ||
#include <cstdio>
#include <algorithm>
using namespace std;
int main()
{
freopen("zlxzf.in", "r", stdin);
freopen("zlxzf.out", "w", stdout);
int k;
char buf[1002];
scanf("%d %s", &k, buf);
int c;
for(int i = 0; buf[i]; i++)
{
if(!i || buf[i] != buf[i-1])c = 1;
else if(++c == k){
putchar(buf[i]);
return 0;
}
}
puts("No");
return 0;
}