Let $\mathcal M$ be the set of $n\times n$ matrices with integer entries. Find all $A\in\mathcal M$ such that $\det(A+B)+\det(B)$ is even for all $B\in\mathcal M$.

[i]Proposed by Ethan Tan[/i]
To solve the problem, we need to find all matrices \( A \in \mathcal{M} \) such that for every \( B \in \mathcal{M} \), the expression \(\det(A+B) + \det(B)\) is even. We will generalize this problem and prove a more general proposition.

1. **Proposition:**
   Let \( p \) be an integer \(\geq 2\) and \( A \in M_n(\mathbb{Z}) \) be such that for every \( X \in M_n(\mathbb{Z}) \), \(\det(A+X) - \det(X) \equiv 0 \pmod{p} \). Then \( A \equiv 0 \pmod{p} \).

2. **Proof:**
   - There exist matrices \( U, V \in M_n(\mathbb{Z}) \) with \(\det(U) = \det(V) = 1\) such that \( UAV = D \) is a diagonal matrix (Smith normal form). This means \( D = \text{diag}(d_1, d_2, \ldots, d_n) \).
   - Consider the transformation \( U(A+X)V \) and \( UXV \). Since \( \det(U) = \det(V) = 1 \), we have:
     \[
     \det(U(A+X)V) = \det(A+X) \quad \text{and} \quad \det(UXV) = \det(X)
     \]
     Therefore, the condition \(\det(A+X) - \det(X) \equiv 0 \pmod{p}\) translates to:
     \[
     \det(U(A+X)V) - \det(UXV) \equiv 0 \pmod{p}
     \]
     which simplifies to:
     \[
     \det(D + Y) - \det(Y) \equiv 0 \pmod{p}
     \]
     where \( Y = UXV \) and \( Y \) ranges over all \( M_n(\mathbb{Z}) \).

3. **Diagonal Matrix Analysis:**
   - Assume there exists an index \( j \) such that \( d_j \not\equiv 0 \pmod{p} \). Without loss of generality, assume \( j = 1 \).
   - Choose \( Y = \text{diag}(y_1, y_2, \ldots, y_n) \) with \( y_1 = -d_1 \) and \( y_i = 1 \) for \( i \geq 2 \).
   - Then:
     \[
     \det(D + Y) = \det \begin{pmatrix}
     0 & 0 & \cdots & 0 \\
     0 & d_2 + 1 & \cdots & 0 \\
     \vdots & \vdots & \ddots & \vdots \\
     0 & 0 & \cdots & d_n + 1
     \end{pmatrix} = (d_2 + 1)(d_3 + 1) \cdots (d_n + 1)
     \]
     and:
     \[
     \det(Y) = (-d_1) \cdot 1 \cdot 1 \cdots 1 = -d_1
     \]
     Therefore:
     \[
     \det(D + Y) - \det(Y) = (d_2 + 1)(d_3 + 1) \cdots (d_n + 1) - (-d_1)
     \]
     Since \( \det(D + Y) - \det(Y) \equiv 0 \pmod{p} \), we have:
     \[
     (d_2 + 1)(d_3 + 1) \cdots (d_n + 1) + d_1 \equiv 0 \pmod{p}
     \]
     This implies \( d_1 \equiv 0 \pmod{p} \), which is a contradiction.

4. **Conclusion:**
   - Since \( d_1 \equiv 0 \pmod{p} \) leads to a contradiction, it must be that \( d_i \equiv 0 \pmod{p} \) for all \( i \).
   - Therefore, \( D \equiv 0 \pmod{p} \) and hence \( A \equiv 0 \pmod{p} \).

The final answer is \( \boxed{ A \equiv 0 \pmod{2} } \).