Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
82799 石晋骁 出现k次的字符 C++ Compile Error 0 MS 0 KB 280 2024-07-13 15:36:31

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ string a; getline(cin,a); int c=1; for(int i =0;i <a.size()i++){ if(a[i] == a[i+1]){ c++; if(c == k){ cout << s[i]; return 0; } }else{ c = 1; } } cout << "No"; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:7:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i =0;i