import java.util.*; class Cryptarithms { public static void permute(int n, int k) { permute(n, k, new HashSet(), new int[k]); } public static void permute(int n, int k, HashSet set, int[] permutation) { if (set.size() == k) doPermute(n, k, set, permutation); else { for (int i=0; i set, int[] permutation) { HashMap charmap = new HashMap(); for (int i=0; i