Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
100619 罗子童 出现k次的字符 C++ Wrong Answer 1 MS 280 KB 563 2024-12-08 18:05:58

Tests(1/10):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int s1=1,m; char s[1001]; cin>>m>>s; for(int i=1;s[i]!='\0';++i){ if(s[i]==s[i+1]){ if(s[i+1]==s[i+2]){ cout<<s[i]; break; } } else{ s1=0; } } return 0; }


Run Info:

------Input------
2 aabbcc
------Answer-----
a
------Your output-----