A 10-digit positive integer $\overline{abcdefghij}$ is beautiful, if the product of its digits ends in 1, that is $abcdefghij=\dots1$ .

How many beautiful numbers are there?

The answer is 262144.

**
This section requires Javascript.
**

You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.

Note that, if the last digit of the product of two number is

1the pair of digit must be $\large(1,1),(3,7)$ or $\large(9,9)$For a

10-digit number , we have4option , $\{1,3,7,9\}$ for the $1_{st}$9place.If the 10-digit positive integer is $\overline{abcdefghij}$ then ,we have

4option for each of these digit - $a,b,c,d,e,f,g,h,i$ , but we have to put a fix number for $j$ . So, there are $4\times4\times4\times4\times4\times4\times4\times4\times=4^9=\boxed{262144}$ such a beautiful number.Bonus:There are $4^{n-1}$ ,n-digit beautiful number.