123 In a triangle with all three sides of positive integer lengths, given one side of length $n$, the other two sides are no longer than $n$, and congruent triangles are counted as one. The number of such triangles is
A. $\frac{n(n+2)}{4}$
B. $\frac{(n+1)^{2}}{4}$
C. $\left[\frac{(n+1)^{2}}{4}\right]$
D. $\left[\frac{(n+1)^{2}}{2}\right]$
123 C. Let the side lengths be $c \leqslant b \leqslant n$.
When $n=2 k$, for $c=1,2, \cdots, k, b$ respectively have $1,2, \cdots, k$ values $(c=1$ when, $b=n ; c=2$ when, $b=n, n-1 ; \cdots)$. For $c>k, b$ and $c$ can take any two values from $k+1, k+2, \cdots, n$ (which can be the same), so there are
$$
1+2+\cdots+k+k+C_{k}^{2}=k^{2}+k=\frac{n^{2}+2 n}{4}
$$

triangles.
When $n=2 k-1$, similarly, the number of triangles is
$$
1+2+\cdots+(k-1)+C_{k}^{2}+k=k^{2}=\left(\frac{n+1}{2}\right)^{2} .
$$

In summary, the result is $\left[\frac{(n+1)^{2}}{4}\right]$.