Please tell me why i am not passing the test cases but my answer is correct this is going to be happen in every code can you guide me how i can pass the test cases
In your if condition
mid*psc<=m+(m-mid)*charges
Change this to
mid*psc<=m+(n-mid)*charges
And then check, if it doesn’t pass all test cases, then let me know. Cause everything seems right.
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.