Solution (source code)

= Solution

Cover the circle by two open arcs whose intersection has two components, and take their products with $X$. Both members of this cover retract onto $X$, while their intersection retracts onto $X\sqcup X$. The <Mayer–Vietoris sequence> has the map
$$
H_j(X)\oplus H_j(X)\longrightarrow H_j(X)\oplus H_j(X),\qquad
(a,b)\longmapsto(a+b,-a-b),
$$
after consistent identifications of the two overlap components. Its kernel and cokernel are each $H_j(X)$. Exactness therefore supplies
$$
0\longrightarrow H_j(X)\longrightarrow H_j(S^1\times X)
\longrightarrow H_{j-1}(X)\longrightarrow0.
$$
This splits because the last <group> is free abelian: lift a basis and extend linearly. With $H_{-1}=0$, the result is
$$
\boxed{H_j(S^1\times X)\cong H_j(X)\oplus H_{j-1}(X).}
$$
Starting from a point and iterating this decomposition, Pascal's identity yields
$$
\boxed{H_j(T^n;\mathbb Z)\cong\mathbb Z^{\binom nj}\quad(0\le j\le n),\qquad
H_j(T^n)=0\quad(j>n).}
$$