When I run the code, it executes and shows the correct answer but when I try to submit it, it shows run time error.
@RIDDHI29 Please share your code using ide.codingblocks.com so I can help you out.