Artificial intelligent assistant

The number of $7×7$ matrices with specific conditions I am asked to find the number of $7×7$ matrices with entries $0,1,2,...,9$ whose determinant is not a multiple of $10$. Expanding the determinant along rows (or columns) gives us a messy expression and, henceforth difficult to deal with. Is it attackable using recurrences or we have to choose another approach? Please help me and give a hint to start with this problem. Thank you.

Let $M_n(m)$ be the set of _all_ $n\times n$ matrices over $\mathbb{Z}/m\mathbb{Z}$, and let $$Z_n(m)=\\{A\in M_n(m) : \det A=0\\}.$$ Chinese remainder theorem says that, for $m_1,m_2$ coprime, the map $$A\mapsto(A\bmod m_1,A\bmod m_2)$$ is a bijection between $M_n(m_1 m_2)$ and $M_n(m_1)\times M_n(m_2)$, and also between $Z_n(m_1 m_2)$ and $Z_n(m_1)\times Z_n(m_2)$. From the link given in the comment above, for prime $p$ we have $$F(n,p):=\\#(M_n(p)\setminus Z_n(p))=\prod_{k=0}^{n-1}(p^n-p^k).$$ Thus the answer is $(pq)^{n^2}-\big(p^{n^2}-F(n,p)\big)\big(q^{n^2}-F(n,q)\big)$ for $n=7, p=2, q=5$.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 57626b9c0fbf0ff98f877efba7c5d5c3