About cookies on this site Our websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising. For more information, please review your options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.
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