here is my code. I’m getting WA.But i cann’t understand why?
the maximum ans will be x^n where
but if x%n!=0
then I increase Y x by one
now the maximum ans will be X(n−y)∗(X+1)y
Can anyone tell me why I am getting WA?Is my logic is wrong?If wrong,then why?
Can you provide a test case for which my code will give WA?
Thanks in advance