2005 PMWC Problems/Problem I1
Problem
What is the greatest possible number one can get by discarding digits, in any order, from the number ?
Solution
The length of the resulting number is the same no matter what, so to maximize the number we want to invoke the greedy algorithm - get as many 9s in the first several digits as possible. There are digits in the original number, so after deleting 100 we will be left with digits. There are six s in the string of numbers. Applying the greety algorithm, we might expect to get , but we promptly run out of digits. So instead, we start with 5 nines, . We would then try to fit an 8 next, but again it turns out that we run out of digits. So we continue with 7. We still need five more digits, and we have six left to choose from. It quickly becomes apparant that our answer is .
See also
2005 PMWC (Problems) | ||
Preceded by First question |
Followed by Problem I2 | |
I: 1 • 2 • 3 • 4 • 5 • 6 • 7 • 8 • 9 • 10 • 11 • 12 • 13 • 14 • 15 T: 1 • 2 • 3 • 4 • 5 • 6 • 7 • 8 • 9 • 10 |