The charge flowing through a resistance $R$ varies with time $t$ as $Q=a t-b t^{2} .$ The total heat produced in $R$ from $t=0$ to the time when value of $Q$ becomes again zero is
(A) $\frac{a^{3} R}{6 b}$
(B) $\frac{a^{3} R}{3 b}$
(C) $\frac{a^{3} R}{2 b}$
(D) $\frac{a^{3} R}{b}$