IBM Research | Ponder This | December 1999 solutions
Skip to main content

December 1999

<<November December January>>


Yes. Work from right to left. Start with N, and notice that its rightmost digit is not zero. Find the rightmost zero; say it's in the Kth position. Then add (10^K)*N (that is, N shifted over K positions) to change that digit without affecting any to the right of it. Now find the next zero, and again add (10^J)*N for some appropriate J. With each iteration, the rightmost zero moves further to the left. Continue until the rightmost zero is at least 1999 places to the left (or there are none). Now our integer is (10^1999)*A + B, where B has no zeros. Subtracting off (10^1999)*A = (2^1999)*(5^1999)*A, we are left with B, which is a multiple of (2^1999) with no zeros in its decimal representation.


If you have any problems you think we might enjoy, please send them in. All replies should be sent to: ponder@il.ibm.com