Why My submission for the following code is not being judged?

Problem - String Comprehension (interview prep in c++)

code -
#include
#include
using namespace std;

int main() {

string str,res;
int cnt=0;
cin>>str;
char ch = str[0];
for(auto c : str){
	if(c == ch)cnt++;
	else{
		res.push_back(ch);
		res+=to_string(cnt);
		ch = c;
		cnt =1;
	}

}

cout<<res;

return 0;

}

hello @bhujangsumeet98
please save ur code here -> https://ide.codingblocks.com/
and share the link