Problem with the solution

sir i dont think it depends on the value of m whether it is prime or not. If n is odd 1 wins and if n is even 2 wins

So, does this strategy not pass all the testcases?

no its not passing any test case

Note that m can be equal to one, so you first need to remove those from n.

sorry it was terrible silly mistake on my part

1 Like