| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 38160 | jiabokai | 字符串p型编码 | C++ | Accepted | 0 MS | 248 KB | 263 | 2024-01-25 15:14:54 |
#include<iostream> #include<cstdio> #include<cstring> using namespace std; char s[1000]; int t=1,l,i; int main() { gets(s); l=strlen(s); for(i=0;i<l;++i){ if(s[i]==s[i+1]){ t++; }else{ cout<<t<<s[i]; t=1; } } return 0; }