I was trying to go through some basic number theory and there I saw a lot of questions based on calculating the number of digits of a number raised to some big power. Many a time the expression gets reduced to multiples of $10$ yielding many zeroes in the end but I am unable to deal with the ones where this doesn't happen.
For e.g.: All the digits of $2^{1989}$ and $5^{1989}$ are written side by side and we need to calculate the total number of digits thus obtained.
Can anybody please help by telling me about some kind of method that I can follow to tackle such problems?
Note that if $x$ has $n$ digits, then $10^{n-1} \leq x \leq 10^n-1$. Taking the $log_{10}$ on all sides of the inequality and rounding down should yield the answer.