I have implemented the solution for deepak and journey problem but I am getting wrong answer.Please check my code here is the link for my code :
Wrong answer verdict
Hey @Debugger
Just try changing everything to long long int and it’ll work.
Your code logic is completely fine. The issue is integer overflow and typecasting.
I suggest try by yourself first and then see the code.
If it helped just mark the query as resolved, you can give ratings too 