Add and Divide - Can some tell where it fails?

we have check if there exist a y>=0 such that pow(b,y)%a==0.
plz help,
My Code(WA):-Solution: 51698307 | CodeChef
.
.
.
also saw same logic in python which got AC
other user’s code(AC):-Solution: 51707628 | CodeChef

Consider the test input:

1                      
256 1999998

thanks!!

1 Like