Failing for one testcase find laregst x that n!%(p^x)

i figured it out but i cant delete the post