Code didnt pass despite of being correct

Code:
#include
#include

int main(){
std::string str;
std::cin>>str;

    int len {str.length()};

    std::string fstr {};
    fstr.append(str, 0, 1);
    std::cout<<fstr<<'\n';
    for(int i=0; i<len-1; i++){

            fstr.append(std::to_string(str[i+1] - str[i]));
            fstr.append(str, i+1, 1);
    }

    std::cout<<fstr<<'\n';
    return 0;

}

This was my solution code to :difference in ascii code" probelm and it did not pass. I had the correct answer to the test case as well as other cases that I unlocked.
Please let me know why the code didn’t pass.

Thanks

@kapurm17 hey mayank please share your code through cb.lk/ide so that I can verify the same.

The share button isn’t working on the ide… could the collaborative screen work?

@jaiskid https://ide.codingblocks.com/s/168195 here it is

@kapurm17 hey mayank try to submit once again it successfully submitting your code.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.