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

(Solution)
(Problem)
 
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
==Problem==
 
==Problem==
 +
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?
  
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 1==
 
 
==Solution==
 
 
 
 
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.
  
 
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.
 
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.
  
one digit: one nine, obviously.
+
*two digit: a nine times nine, plus 10 other nines, is 19 nines.
  
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.
  
three digit: 20 per hundred, plus another hundred for the 900s, is 280.
+
<math>20+280=300 \Longrightarrow 300*2-5=595</math> is the answer.
  
20+280=300. 300*2-5=595.
+
== Solution 2 ==
 +
Consider the numbers from 1 to 1000. Since <tt>9</tt> appears <math>\frac{1}{10}</math> of the time for each digit (if we include 0), there are <math>\frac{1000}{10} = 100</math> '<tt>9</tt>'s in each place, for a total of <math>300</math> '<tt>9</tt>'s. Repeating again up to 2000, there are <math>600</math> '<tt>9</tt>'s; we exclude <math>1998, 1999</math>, so we have <math>600 - 5 = 595</math> '<tt>9</tt>'s.
  
 
==See Also==
 
==See Also==
 +
{{PMWC box|year=1997|num-b=T2|num-a=T4}}
  
{{PMWC box|year=1997|num-b=T2|num-a=T4}}
+
[[Category:Introductory Algebra Problems]]

Latest revision as of 13:39, 20 April 2014

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.

$20+280=300 \Longrightarrow 300*2-5=595$ is the answer.

Solution 2

Consider the numbers from 1 to 1000. Since 9 appears $\frac{1}{10}$ of the time for each digit (if we include 0), there are $\frac{1000}{10} = 100$ '9's in each place, for a total of $300$ '9's. Repeating again up to 2000, there are $600$ '9's; we exclude $1998, 1999$, so we have $600 - 5 = 595$ '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