6. If the positive integer $a$ makes the maximum value of the function $y=f(x)=x+\sqrt{13-2 a x}$ also a positive integer, then this maximum value equals
A. 3
B. 4
C. 7
D. 8
6. $\mathrm{C}$ Let $\sqrt{13-2 a x}=t,(t \geqslant 0), x=\frac{13-t^{2}}{2 a}, y=-\frac{1}{2 a}(t-a)^{2}+\frac{a^{2}+13}{2 a} \cdot t=a$ when, $y_{\text {max }}=$ $\frac{a^{2}+13}{2 a}$, to make $\frac{a^{2}+13}{2 a}$ a positive integer, $a$ must be an odd number. And $\frac{a^{2}+13}{2 a}=\frac{1}{2}\left(a+\frac{13}{a}\right), a+\frac{13}{a}$ should be even, so $a=1$ or 13. $y_{\max }=7$.