Problem

Source: 2019 Taiwan APMO Preliminary

Tags: remainder, modulo, number theory



Put $1,2,....,2018$ (2018 numbers) in a row randomly and call this number $A$. Find the remainder of $A$ divided by $3$.