Arrange the 10 numbers from 1 to 10 in a row so that the sum of every 3 adjacent numbers is a multiple of 3. How many ways are there in total?
将1～10这10个数排成一行，使得每相邻3个数的和都是3的倍数，共有多少种排法．
<gadget id="calculator">4 * 3 * 2 * 1</gadget>
<output>24</output>

<gadget id="calculator">3 * 2 * 1</gadget>
<output>6</output>

<gadget id="calculator">24 * 6 * 6</gadget>
<output>864</output>

<gadget id="calculator">864 * 2</gadget>
<output>1_728</output>

<result>1_728</result>