Multiplying out $1 \times 2 \times 3 \times 4 \times 5 \times 6 \times 7 \times 8 \times 9$ might take a while.

What if we only wanted to know what the *last* digit will be? Is there a shortcut? Keep reading to find out, or skip ahead to the challenge if you think you already know.

Let's see what happens if we start multiplying these numbers out in order:

$\begin{aligned} & 1 \times 2 \times 3 \times 4 \times 5 \times 6 \times 7 \times 8 \times 9 \\ & \mathbf{2} \times 3 \times 4 \times 5 \times 6 \times 7 \times 8 \times 9 \\ & \mathbf{6} \times 4 \times 5 \times 6 \times 7 \times 8 \times 9 \\ & \mathbf{24} \times 5 \times 6 \times 7 \times 8 \times 9 \\ & \mathbf{120} \times 6 \times 7 \times 8 \times 9 \\ \end{aligned}$

We could keep going, but there's already a zero in the last place. No matter what number we multiply by any multiple of ten, we'll always end up with another multiple of ten. The final product will have a zero in the ones place $($by the way, the product happens to be $362,880).$

Did we have to go through the remaining four multiplications to figure this out, though? Not if we remembered that multiplication is associative. We can move and regroup the numbers we're multiplying however we want:

Since we have a $2$ and a $5$ in the product, we know the product is a multiple of $2 \times 5 = 10.$ Without doing a single calculation, we can conclude that the last digit will be a zero.

What happens in the product below?