Not getting correct output in my system

Hi
I am not getting correct output in my system although all the test cases have passed in coding blocks submission page.
For input = 321,I am getting output =122. Could you please tell what could be the cause?

@rbak i think there may be any random error but your code is producing the correct result.
you can check your code by running it here:
ide.codingblocks.com .
check this is your code which is giving the correct result.
https://ide.codingblocks.com/s/426845

I am getting the same wrong output, every time I run the code with that value.

@rbak can you please share the screenshot.

Hello @rbak what i can see is that this is sublime issue because your code is perfectly fine.
so you can try to reconfigure your sublime that should work.

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.