For a positive integer $n$ determine all $n\times n$ real matrices $A$ which have only real eigenvalues and such that there exists an integer $k\geq n$ with $A + A^k = A^T$.
1. **Eigenvalue Analysis**:
   Let $\lambda$ be an eigenvalue of $A$ and $v$ be its associated eigenvector. From the given condition, we have:
   \[
   A + A^k = A^T
   \]
   Applying this to the eigenvector $v$, we get:
   \[
   A^T v = (A + A^k) v
   \]
   Since $Av = \lambda v$ and $A^k v = \lambda^k v$, we can rewrite the equation as:
   \[
   A^T v = \lambda v + \lambda^k v = (\lambda + \lambda^k) v
   \]
   This implies that $\lambda + \lambda^k$ is an eigenvalue of $A^T$ with the same eigenvector $v$.

2. **Transposing the Equation**:
   Transposing both sides of the original equation, we get:
   \[
   (A + A^k)^T = (A^T)^T = A
   \]
   Since $(A^k)^T = (A^T)^k$, we have:
   \[
   A^T + (A^T)^k = A
   \]
   Substituting the original equation $A + A^k = A^T$ into this, we get:
   \[
   A + A^k + (A^T)^k = A
   \]
   Simplifying, we obtain:
   \[
   A^k + (A^T)^k = 0
   \]

3. **Eigenvalue Condition**:
   Let $\lambda$ be a non-zero eigenvalue of $A$. Then, $\lambda^k + (\lambda + \lambda^k)^k = 0$. If $\lambda \neq 0$, then:
   \[
   \lambda^k + (\lambda + \lambda^k)^k = 0
   \]
   This implies:
   \[
   1 + (1 + \lambda^{k-1})^k = 0
   \]
   Since $\lambda \in \mathbb{R}$, for this to hold, $k$ must be odd. However, this leads to a contradiction because the right-hand side would be positive. Hence, $\lambda = 0$.

4. **Conclusion on Eigenvalues**:
   Since all eigenvalues of $A$ are zero, $A$ is a nilpotent matrix. Therefore, $A$ is similar to the zero matrix. Specifically, $A = PJP^{-1}$, where $J$ is a Jordan matrix with all eigenvalues zero.

5. **Symmetry and Nilpotency**:
   Given $k \geq n$, $A^k = 0$. Thus, the original equation simplifies to:
   \[
   A = A^T
   \]
   This implies that $A$ is symmetric. Since $A$ is symmetric and nilpotent, it must be the zero matrix.

6. **Verification**:
   If $A = 0$, then:
   \[
   A + A^k = 0 + 0 = 0 = A^T
   \]
   This satisfies the given condition.

The final answer is $\boxed{A = 0}$