参考文献
C++ 代码
#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
int main()
{
int n ;
cin >> n ;
while (n -- )
{
int a = 0 ;
string s ;
cin >> s ;
for (int i = 0; i < s.size() ; i ++ ){
cout << s[i] ;
if (s[i] == '1'){
a ++ ;
if(a == 5) i ++ , a = 0 ;
}
else a = 0 ;
}
cout << endl ;
}
}