| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 89643 | sh25_shengmy | 连续出现的字符 | C++ | Accepted | 0 MS | 248 KB | 536 | 2026-06-05 14:41:13 |
#include <iostream> #include <string> using namespace std; int main() { int k; string s; cin >> k >> s; if (k == 1) { cout << s[0] << endl; return 0; } int count = 1; for (int i = 1; i < s.size(); i++) { if (s[i] == s[i-1]) { count++; if (count >= k) { cout << s[i] << endl; return 0; } } else { count = 1; } } cout << "No" << endl; return 0; }