SHOPPING GAME PROBLEM

my one test case didn’t passed in SHOPPING GAME PROBLEM.

Hello, @Mayankrocks,

I have implemented correct logic for you Code

what is the issue in my code?

it is not passing for 1 test case

@Mayankrocks,

Let me give you a simple test case where your code is not working for proper understanding,

2
3 3
7 7

Your Output:

Aayush
Aayush

Correct Output:

Harshit
Harshit

For m=3 and n =3,
First Aayush will buy 1 smartphone and Harshit will buy 2 smartphones,
then Aayush won’t be able to buy 3 smartphones. So, the winner is Harshit.

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.