help in expressing a number N in base K.

I have read the editorial and in the last part there is a pseudocode for representing the number N in base K. Can someone please explain me why that is working?

Its right na? To express a decimal number in some base u use repeated division method.

sorry! I am thinking it in wrong way. Anyways thanks :slight_smile:

1 Like