Let $A = \{m : m$ an integer and the roots of $x^2 + mx + 2020 = 0$ are positive integers $\}$
and $B= \{n : n$ an integer and the roots of $x^2 + 2020x + n = 0$ are negative integers $\}$.
Suppose $a$ is the largest element of $A$ and $b$ is the smallest element of $B$. Find the sum of digits of $a + b$.
1. **Finding the largest element of \( A \):**

   The roots of the quadratic equation \( x^2 + mx + 2020 = 0 \) are positive integers. Let the roots be \( p \) and \( q \). By Vieta's formulas, we have:
   \[
   p + q = -m \quad \text{and} \quad pq = 2020
   \]
   Since \( p \) and \( q \) are positive integers, they must be factors of 2020. The factor pairs of 2020 are:
   \[
   (1, 2020), (2, 1010), (4, 505), (5, 404), (10, 202), (20, 101), (101, 20), (202, 10), (404, 5), (505, 4), (1010, 2), (2020, 1)
   \]
   We need to find the pair that gives the largest value of \( m = -(p + q) \). Calculating \( p + q \) for each pair:
   \[
   \begin{aligned}
   &1 + 2020 = 2021, \\
   &2 + 1010 = 1012, \\
   &4 + 505 = 509, \\
   &5 + 404 = 409, \\
   &10 + 202 = 212, \\
   &20 + 101 = 121.
   \end{aligned}
   \]
   The smallest sum is \( 121 \), so the largest \( m \) is:
   \[
   m = -121
   \]

2. **Finding the smallest element of \( B \):**

   The roots of the quadratic equation \( x^2 + 2020x + n = 0 \) are negative integers. Let the roots be \( -r \) and \( -s \). By Vieta's formulas, we have:
   \[
   -r - s = 2020 \quad \text{and} \quad rs = n
   \]
   Since \( r \) and \( s \) are positive integers, they must be factors of \( n \). We need to find the pair that gives the smallest value of \( n = rs \). The factor pairs of 2020 are the same as above. Calculating \( rs \) for each pair:
   \[
   \begin{aligned}
   &1 \cdot 2020 = 2020, \\
   &2 \cdot 1010 = 2020, \\
   &4 \cdot 505 = 2020, \\
   &5 \cdot 404 = 2020, \\
   &10 \cdot 202 = 2020, \\
   &20 \cdot 101 = 2020.
   \end{aligned}
   \]
   The smallest \( n \) is \( 2020 \).

3. **Calculating \( a + b \):**

   The largest element of \( A \) is \( a = -121 \) and the smallest element of \( B \) is \( b = 2020 \). Therefore:
   \[
   a + b = -121 + 2020 = 1899
   \]

4. **Finding the sum of the digits of \( a + b \):**

   The sum of the digits of \( 1899 \) is:
   \[
   1 + 8 + 9 + 9 = 27
   \]

The final answer is \( \boxed{27} \)