All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Going Maximum With Deleted Digits (Posted on 2008-11-17)
The 154-digit number 1920212223……….939495 is constituted by writing the positive integers 19 to 95 one after the other.

Precisely 95 of the digits of the original number are now removed in such a way that the resulting number has the greatest possible value. All the 95 digits which are removed may not necessarily be consecutive in the original number.

What are the first 19 digits of the 59-digit number that remains?

Note: Try to derive a non computer-assisted solution, although computer program/spreadsheet solutions are welcome.

 See The Solution Submitted by K Sengupta No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 solution Comment 1 of 1

So we're seeking a (154-95)-digit number, i.e., a 59 digit number.

The 2-digit numbers 19 through 89 contain only eight 9's to start with and would leave you with only 12 digits from the 90's, so at some point you should start looking for 8's rather than 9's.

Let's look at the original 154-digit number:

19202122232425262728293031323334353637383940414243444546474849505152535455565758
59606162636465666768697071727374757677787980818283848586878889909192939495

The first 9 is in position 2, leaving 152 digits remaining to form our 59-digit number. (I am counting positions from the left.)

We continue like this, but after finding the 5th 9 in position 82, if we took another 9, from position 102, we'd have only 52 digits remaining, but we'd have built only 6 digits of the new number, so we couldn't achieve the 59 we want. So, as the next digit, we'll settle for the 8 in position 100. Now that we have built six digits, taking the 9 from position 102 gives us the 7th digit. Then the remaining 52 digits will complete our 59-digit number:

99999897071727374757677787980818283848586878889909192939495,

the first 19 of which are:

9999989707172737475.

 Posted by Charlie on 2008-11-17 16:10:24

 Search: Search body:
Forums (0)