Chetan Mandayam Nayakar
Last Activity: 13 Years ago
This problem has an extremely lengthy solution. Therefore I will simply give the algorithm of the solution.
first let us include zero. Then by trial and error, select a set of four other number from the given list whose sum is divisible by 3. The left-most digit cannot be zero. thus the left-most digit can be filled in 4 diferent ways. the remaining 4 digits can be filled up in 4*3*2*1 ways. Repeat this procedure for each set of 5 digits from the list containing zero.
now let us exclude zero. Again by trial and error select a set of 5 digits whose sum is divisible by 3. The digits can be arranged in 5*4*3*2*1 ways. Repeat this procedure for each set.
Add up all the number of formations above. This will give the answer.