Difference between revisions of "1997 PMWC Problems/Problem T3"
(→Solution) |
(→Problem) |
||
Line 1: | Line 1: | ||
==Problem== | ==Problem== | ||
− | To type all the integers from 1 to 1997 using a typewriter on a piece of paper, how many times is the key '<tt>9</tt>' needed to be pressed? | + | To type all the integers from <tt>1</tt> to <tt>1997</tt> using a typewriter on a piece of paper, how many times is the key '<tt>9</tt>' needed to be pressed? |
− | |||
==Solution 1== | ==Solution 1== | ||
Let's call the three digit, two digit, and one digit numbers, when combined, the 0 thousands. | Let's call the three digit, two digit, and one digit numbers, when combined, the 0 thousands. |
Latest revision as of 13:39, 20 April 2014
Contents
Problem
To type all the integers from 1 to 1997 using a typewriter on a piece of paper, how many times is the key '9' needed to be pressed?
Solution 1
Let's call the three digit, two digit, and one digit numbers, when combined, the 0 thousands.
The 0 thousand has the same number of nines as the one thousand, so we can compute the number of nines in the 0 thousands and multiply it by 2 and subtract 5, since we are leaving out 1998 and 1999.
- one digit: one nine, obviously.
- two digit: a nine times nine, plus 10 other nines, is 19 nines.
- three digit: 20 per hundred, plus another hundred for the 900s, is 280.
is the answer.
Solution 2
Consider the numbers from 1 to 1000. Since 9 appears of the time for each digit (if we include 0), there are '9's in each place, for a total of '9's. Repeating again up to 2000, there are '9's; we exclude , so we have '9's.
See Also
1997 PMWC (Problems) | ||
Preceded by Problem T2 |
Followed by Problem T4 | |
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 |