Find the integer $n$, $4 \le n \le 8$, such that \[n \equiv 7882 \pmod{5}.\]
I need to find an integer $n$ between 4 and 8 that has the same remainder as 7882 when divided by 5. I can use the division algorithm to write $7882 = 5q + r$, where $q$ is the quotient and $r$ is the remainder. Then I can compare $r$ to the possible values of $n$ and see which one matches. To find $r$, I can divide 7882 by 5 using long division or a calculator. I get $7882 = 5 \times 1576 + 2$, so $r = 2$. Now I can look at the possible values of $n$ and see which one is also 2 mod 5. 4 mod 5 is 4, 5 mod 5 is 0, 6 mod 5 is 1, 7 mod 5 is 2, and 8 mod 5 is 3. The only one that matches 2 mod 5 is 7, so $n = 7$.

