On a sheet of paper, 100 characters fit in width and 100 in height. On this sheet, the numbers $1,2,3, \ldots$ are written successively with a space between each one. When at the end of a line there is not enough space to write a number, it is written on the next line. What is the last number written on the sheet?
On the $1^{\underline{a}}$ line, we write the numbers from 1 to 9, each followed by a space, occupying 18 spaces, and 82 spaces remain. Each number of 2 digits plus one space occupies 3 places on the line. Since $82=27 \times 3+1$, we complete the $1 \underline{\underline{a}}$ line with 27 numbers of two digits starting from 10. Thus, the last number of the first line is 36. Representing each space by a dash, the $1 \underline{\underline{a}}$ line looks like this:

$$
\underbrace{1-2-3-4-5-6-7-8-9}_{18} \underbrace{10-\cdots-36-}_{82}
$$

Since $100=33 \times 3+1$, in each line we can place 33 numbers of 2 digits, each followed by a space, and at the end of the line, one space remains:

$$
2^{\underline{a}} \operatorname{line}: \underbrace{37-38-\cdots-69-}_{99}-
$$

On the $3^{\underline{a}}$ line, we place numbers from 70 to 99, occupying $30 \times 3=90$ spaces. The 10 remaining spaces are filled with two numbers of 3 digits:

![](https://cdn.mathpix.com/cropped/2024_05_01_166d7b619133f9b517e0g-6.jpg?height=114&width=799&top_left_y=1442&top_left_x=640)

Now, in each line we can place $100 \div 4=25$ numbers of 3 digits with their respective spaces. From 102 to 999 inclusive, we have $999-102+1=198$ numbers. Since $198=25 \times 7+23$, we occupy the $4^{\underline{a}}$ to $10^{\underline{a}}$ lines with the numbers of 3 digits and 23 spaces remain on the 10 $\underline{\underline{a}}$ line, which we can fill with $23 \div 5=4$ numbers of 4 digits:

$10^{a}$ line: $\underbrace{--\cdots-999-}_{67} \underbrace{1000-1001-1002-}_{23}---$

In each line, we can place $100 \div 5=20$ numbers of 4 digits and their respective spaces. Therefore, in the remaining 90 lines, we can place $90 \times 20=1800$ numbers of 4 digits. Starting with 1003, we will reach the number 2802.