Help with logic

prob: https://hack.codingblocks.com/app/contests/2022/1259/problem

sol: https://ide.codingblocks.com/s/392459

what changes do I need to make for printing the steps

Hello @raghav007 i have corrected your code:


it is giving the correct ouput and passing every test case:
Happy Learning!!

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.