Problem

Source: 2015 Azerbaijan JBMO TST

Tags: combinatorics



$A=1\cdot4\cdot7\cdots2014$.Find the last non-zero digit of $A$ if it is known that $A\equiv 1\mod3$.