5. The positive integer solutions to the equation $x y-3 x^{2}=12$ are $(x, y)$. Then the number of all such solutions $(x, y)$ is ( ).
(A) 5
(B) 3
(C) 4
(D) 6
5.(D).
$y=3 x+\frac{12}{x}$. When $x=1,2,3,4,6,12$, $y=15,12,13,15,20,37$. Therefore, there are 6 solutions.