#include"stdio.h"
#include"string.h"
char str[10000];
void print(){
    scanf("%s",str);
    int i = 0,len = strlen(str),k;    
    char c ;
    while(i < len){
        c = str[i];
        k = i;
        while(str[++i] == c){            
        }
        if(i - k > 1)
            printf("%d%c",i - k,c);
        else
            printf("%c",c);
    }
    printf("\n");        
}
int main(){
    int nCases;
    scanf("%d",&nCases);
    while(nCases--){
        print();
    }
    return 0;    
}

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-02-01
  • 2021-05-16
  • 2021-12-23
  • 2021-12-03
  • 2022-12-23
  • 2021-09-22
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-27
  • 2021-09-26
  • 2021-10-31
  • 2021-05-31
相关资源
相似解决方案