1.99 Let point $M$ have coordinates $(p \times 1994, 7p \times 1994)$ on the plane, where $p$ is a certain prime number. Find the number of right triangles that satisfy the following conditions:
(1) The 3 vertices of the triangle are all integer points, and $M$ is the right-angle vertex;
(2) The triangle has the coordinate origin as its incenter.
[Solution] Connect the origin $O$ and point $M$, and let the midpoint of line segment $OM$ be $I(p \times 997, 7p \times 997)$. For each right-angled triangle that meets the requirements, perform a central symmetry about point $I$, i.e., transform point $(x, y)$ into point $(p \times 1994 - x, 7p \times 1994 - y)$. Thus, each right-angled triangle that meets the requirements is transformed into a congruent integer-point triangle, with the incenter of the original triangle moving to point $M$ and the right-angle vertex moving to the origin. Therefore, it is sufficient to count the number of right-angled triangles with the right-angle vertex at the origin and the incenter at point $M$.

Consider an integer-point right-angled $\triangle OAB$. Let $\angle xOM = \beta$, $\angle xOA = \alpha$. Noting that $\operatorname{tg} \beta = 7$, $\alpha + \frac{\pi}{4} = \beta$, we have
$$
\operatorname{tg} \alpha = \operatorname{tg}\left(\beta - \frac{\pi}{4}\right) = \frac{\operatorname{tg} \beta - 1}{1 + \operatorname{tg} \beta} = \frac{3}{4}.
$$

Thus, the coordinates of any point on the leg $OA$ can be written as $(4t, 3t)$. Since $A$ is an integer point, $t \in \mathbb{N}$, and $OA = 5t$. Since $OB \perp OA$, the coordinates of point $B$ are $(-3s, 4s)$, where $s \in \mathbb{N}$. Thus, $OB = 5s$. The inradius of the right-angled $\triangle OAB$ is $r = \frac{\sqrt{2}}{2} OM = 5p \times 1994$. We write
$$
OA = 2r + k, \quad OB = 2r + h,
$$

Since $OA$, $OB$, and $r$ are all multiples of 5, the natural numbers $k$ and $h$ are also multiples of 5.
By the tangent segment theorem, we have
$$
AB = (r + k) + (r + h) = 2r + k + h.
$$

Using the Pythagorean theorem, we get
$$
\begin{aligned}
0 &= AB^2 - OA^2 - OB^2 = (2r + k + h)^2 - (2r + k)^2 - (2r + h)^2 \\
&= 2kh - 4r^2.
\end{aligned}
$$

Solving this, we get $kh = 2r^2$. Since $\frac{k}{5}$ and $\frac{h}{5}$ are natural numbers, we have
$$
\frac{k}{5} \cdot \frac{h}{5} = 2^3 \times 997^2 \times p^2.
$$

When $p \neq 2$ and $p \neq 997$, from (3) we get
$$
\left\{\begin{array}{l}
\frac{k}{5} = 2^i \times 997^j \times p^n, \\
\frac{h}{5} = 2^{3-i} \times 997^{2-j} \times p^{2-n},
\end{array}\right.
$$

where $i = 0, 1, 2, 3$, $j = 0, 1, 2$, $n = 0, 1, 2$. Thus, equation (3) has $4 \times 3 \times 3 = 36$ different solutions. When $p = 2$, equation (3) becomes
$$
\frac{k}{5} \cdot \frac{h}{5} = 2^5 \times 997^2.
$$

Similarly, equation (3) has $6 \times 3 = 18$ different solutions. Similarly, when $p = 997$, equation (3) has 20 different solutions. From (2), we know that each solution of equation (3) corresponds to one right-angled triangle that meets the requirements, and different solutions correspond to different right-angled triangles. Therefore, the number of right-angled triangles that meet the requirements is
$$
m = \left\{\begin{array}{ll}
36, & \text{when } p \neq 2, p \neq 997, \\
18, & \text{when } p = 2, \\
20, & \text{when } p = 997.
\end{array}\right.
$$