Assume $a$ as a real number, such that $0<a <1$
I.
The number of integral solutions should be the same as:
The coefficient of $a ^ {39}$ in
$ \left(1+a + a^{2} + a^{3} + ... \right)^4$
Which is coeffient of $a^{39}$ in the series for
$ \left(1-a\right)^{-4}$
which is $\binom{39+4}{3}$
II.
Answer is same as the coefficient of $a ^ {39}$ in
$ \left(a^{3} + a^{4} + a^{5} + a^{6} + ... + a^{12} \right)^3\left(1+a + a^{2} + a^{3} + ... \right)$
= coeffient of $a^{30}$ in
$ \left(1+a+a^2+a^3+ ... + a^{9} \right)^3\left(1+a + a^{2} + a^{3} + ... \right)$
= coeffient of $a^{30}$ in
$ \left(1-a^{10}\right)^3\left(1-a\right)^{-4}$
= coeffient of $a^{30}$ in
$ \left(1-3a^{10} + 3a^{20} -a^{30}\right)\left(1-a\right)^{-4}$
Since $\left(1-a\right)^{-4}$ is
$1 +\binom{3+1}{3}a+\binom{3+2}{3}a^3+\binom{3+3}{3}a^3+ ...$
Ignore all powers more than 30
Answer
$= \binom{33}{3}-3\binom{23}{3}+3\binom{13}{3}-\binom{3}{3}$