Let $q > 2$ and $c$ are two integers with $(q, c) = 1$,
for each integer $a$ with $0 < a < q$ and $(a, q) = 1$,
there exists one and only one $b$ with $0 < b < q$ such
that $ab \equiv c \pmod{q}$. Let
\[ M(q,k,c,n) = \underset{a_1 \dotsm a_n b \equiv c \pmod{q}}
{\sideset{}{'}\sum_{a_1=1}^q \dotsm \sideset{}{'}\sum_{a_n=1}^q \sideset{}{'}\sum_{b=1}^q}
(a_1 \dotsm a_n - b)^{2k}, \]
the main purpose of this paper is to study the asymptotic behavior
of $M(q,k,c,n)$, and prove that for any positive integers $k$ and $n$
with $n \ge 2$ we have
\[ M(q,k,c,n) = \frac{\phi^n(q) q^{2kn}}{(2k+1)^n}
+ O \Bigl( 4^k q^{(2k+1)n - (1/2)} d^2(q) \ln q \Bigr). \]