## Task 4 - 190624

An automatic number stamp for a series production prints exactly one natural number every second. It starts with the number 0 and then continues to print the subsequent numbers $1,2,3, \ldots$ in sequence.

Determine the total number of the digit 1 that the stamp will print in the first quarter of an hour!
Every minute has 60 seconds, so because $15 \cdot 60=900$, the stamp has to print exactly 900 numbers, i.e., the natural numbers from 0 to 899.

When printing the numbers from 0 to 9, the digit 1 appears exactly 1 time.

If we prepend each of these numbers (i.e., at the tens place) with each of the nine digits 1, ..., 9, we obtain all natural numbers from 10 to 99, each exactly once. Thus, the digit 1 appears at the units place in these numbers a total of exactly 9 times. Furthermore, there are exactly ten numbers among these with the tens digit 1 (namely the numbers 10, ..., 19). Thus, the digit 1 appears at the tens place in the numbers from 10 to 99 a total of exactly 10 times.

If we prepend each of the numbers from 0 to 99 (after the numbers from 0 to 9 have been written as two-digit numbers by adding a tens digit 0) at the hundreds place with each of the eight digits 1, ..., 8, we obtain all natural numbers from 100 to 899, each exactly once. Thus, the digit 1 appears at the units and tens places in these numbers a total of eight times the previously determined frequency $(1+9+10=20)$, i.e., exactly 160 times. Furthermore, there are exactly 100 numbers among these with the hundreds digit 1 (namely the numbers 100, ..., 199). Thus, the digit 1 appears at the hundreds place in the numbers from 100 to 899 a total of exactly 100 times.

Thus, all occurrences of the digit 1 have been considered; their total number is $1+9+10+160+100=$ 280.

Solutions of the II. Round 1979 taken from [5]

### 3.21 XX. Olympiad 1980

### 3.21.1 I. Round 1980, Class 6