Possible Duplicate:
Computing GCD of all permutations (of the digits) of a given number.
How can we find the greatest common divisor (GCD) of all numbers that can be obtained by permuting the digits in the given number?
Please suggest a feasible algorithm.