18. In how many different ways can we rearrange the twelve integers 1 to 12 on the face of a clock so that the sum of any three adjacent integers after the rearrangement is divisible by 3 ?
(2 marks)
有多少種不同的方法可把鐘面上 1 至 12 等 12 個整數重新排列, 使得排列後任意三個相鄰的整數之和皆可被 3 整除？
（２分）
18. 82944
18. Note that, in order for the sum of any three adjacent integers after the rearrangement to be divisible by 3 , any three adjacent integers must be pairwise different modulo 3 . For the original positions of $1,2,3$, there are $3!=6$ possibilities to arrange three numbers taken modulo 3 (i.e. exactly one of these positions is to be occupied by a number divisible by 3 , one by a number congruent to 1 modulo 3 , etc.). The remaining numbers, taken modulo 3 , are then fixed. (For example, if the three numbers occupying the original positions of $1,2,3$ are $8,9,10$, then the twelve numbers modulo 3 in clockwise order starting from the original position of 1 must be 2 , $0,1,2,0,1,2,0,1,2,0,1$.) For each such 'modulo 3 ' arrangement, there are $4!=24$ ways to arrange each of the 4 numbers congruent to 0,1 and 2 modulo 3 . Hence the answer is $6 \times 24 \times 24 \times 24=82944$.