package pratice;
import java.util.Set;
import java.util.TreeSet;
public class composeNumber {
public static Set compose(int[] no) {
int n = 0;
Set shulie = new TreeSet();
for (int i = 1; i <= no.length; i++) {
for (int j = 1; j <= no.length; j++) {
for (int j2 = 1; j2 <= no.length; j2++) {
if (i != j && i != j2 && j != j2) {
shulie.add(i * 100 + j * 10 + j2);
}
}
}
}
return shulie;
}
public static void main(String[] args) {
int[] no = { 1, 2, 3, 4 };
System.out.println(compose(no).toString());
System.out.println(compose(no).size());
}
}