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):-CodeChef: Practical coding for everyone
.
.
.
also saw same logic in python which got AC
other user’s code(AC):-CodeChef: Practical coding for everyone

Consider the test input:

1                      
256 1999998

thanks!!

1 Like