Let \({P}_{1},{P}_{2},\ldots,{P}_{l}\in {\mathbb{Z}}\left[X,Y\right]\) be homogeneous polynomials of degree 2, with nonpositive discriminant and let Q be a polynomial with integer coefficients. Under the assumption that 0 is a root of Q with odd multiplicity, we show that the variant of the Brocard–Ramanujan Diophantine equation \(Q\left(n!\right)=\prod_{i=1}^{l}{P}_{i}{\left({X}_{i},{Y}_{i}\right)}^{{\alpha }_{i}}\) has only finitely many integer solutions \(\left(n,{\overline{X}}_{l},{\overline{Y}}_{l},{\overline{\alpha }}_{l}\right),\) where \({\overline{X}}_{l}=\left({X}_{1},{X}_{2},\ldots {X}_{l}\right)\) .