String Compression Problem

I am not able to submit the code but my code works correctly.

@vivekpatel are you facing some issue with the IDE or does it say wrong answer, run-error or something like that?