How many numbers end with $0,2,9$?

74 Views Asked by At

The question is very simple: How many positive integers from $900$ and down end with $0,2$ and $9$?

I think it is either $270$ numbers or $271$ numbers, but I am not sure which one.

2

There are 2 best solutions below

4
On

It's 270. Every consecutive set of size 10 starting from 1 (ie, $1\ldots 10, 11\ldots 20$ etc) has 3 numbers ending with 0,2,or 9. There are exactly $900/10 = 90$ such sets in the numbers $1\ldots 900$, so there are $90\cdot 3 = 270$ such integers.

0
On

Zero is neither positive nor negative, so you can start with the number $2$ and go up to $900$ since it contains a zero. Numbers that end in $2$ are $2$ itself, $12$, $22$, $32$, $42$, $52$, and so on to $892$, so that's $90$ of them there. Also, those numbers that end in $9$ to $899$ are $9$ itself, $19$, $29$, $39$, $49$, $59$, $69$, and so on. Threre are also $90$ numbers here, but for zero, you start with $10$ and go on to $900$. We still get $90$ of those numbers, so no matter what digit you use for up to $900$ with positive integers, you get $90$ each, so with $3$ chosen digits, you get $90$ times $3$ is $270$. Warning: Don't use the zero.