//1代表美国,2代表德国,3代表英国 4,代表法国 5,代表俄国,6代表意大利
public class WhichCountry {
public static void main(String[] args) {
for(int a = 1;a<=6;a++){
for(int b = 1;b<=6;b++){
for(int c = 1;c<=6;c++){
for(int d = 1;d<=6;d++){
for(int e = 1;e<=6;e++){
for(int f = 1;f<=6;f++){
if(a!=b&&a!=c&&a!=d&a!=e&a!=f&b!=c&b!=d&b!=e&b!=f&c!=d&c!=e&c!=f
&d!=e&d!=f&e!=f
&a!=1&a!=5&a!=2&e!=5&e!=1&e!=2&c!=1&c!=2&c!=5&a!=4&c!=6&b!=1
&c!=5&b!=4&b!=1&!(c==4&a==6)&a!=3&b!=2&f!=2){
System.out.print(a+" ");
System.out.print(b+" ");
System.out.print(c+" ");
System.out.print(d+" ");
System.out.print(e+" ");
System.out.println(f+" ");
System.out.print("other:");
}
}
}
}
}
}
}
}
}
[此贴子已经被作者于2006-8-26 21:25:25编辑过]