Only 4 test cases are passed...rest are runtime error and wrong output

code https://ide.codingblocks.com/s/49025
problem https://hack.codingblocks.com/contests/c/548/100

Hey Gaurav, can you please tell which batch you belongs to?

online algo++
batch that started on Nov 18 and ending on may 19

Okay, then how you shared https://hack.codingblocks.com/contests/c/548/100 link, this is the link of java crux’s batch hackathon’s problem.

this is one of challenge question…i just type string compression coding blocks in google and get the this link in first search…so I just clicked their…question appears…and I sent you the link

Oh Okay, got it. :slight_smile:

Now please help me with this problem

Yeah, just debugging your code.

Hey Gaurav, there are many bugs in your code and your approach is also not working for some cases, there is no need to take the counter as global variable, also you are not supposed to take string s of size 10. Also, after taking the input in a char array you are supposed to add a null character at last.
Here i am sharing my code, you can refer this.

okay thank you so much