One test case is failing in this code, please check why.I am unable to find the reason

hello @vibhor1007
image
intechange the position of n and m