Question: efficient code for number of divides

Hello

I am looking for an efficient code to divide a given integer n by another integer d as many times as possible.

For example:

For n=294912 and d=8 the answer shoud be 9, because 294912/8^5=9.

Thank you for your help.

Please Wait...