Difference between revisions of "1997 PMWC Problems/Problem T3"

(Removing all content from page)
Line 1: Line 1:
 +
==Problem==
  
 +
To type all the integers from 1 to 1997 using a typewriter on a piece of paper, how many times of the key '9' needed to be pressed?
 +
 +
==Solution==
 +
 +
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.
 +
 +
20+280=300. 300*2-5=595.
 +
 +
==See Also==
 +
 +
{{PMWC box|year=1997|num-b=T2|num-a=T4}}

Revision as of 09:20, 9 October 2007

Problem

To type all the integers from 1 to 1997 using a typewriter on a piece of paper, how many times of the key '9' needed to be pressed?

Solution

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.

20+280=300. 300*2-5=595.

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