(求助)吸血鬼数字 算法问题
public class xixuegui {
public static void main (String[] args) {
int i,j,k,a,b,c,d,n,m;
for(i=1001;i <9999;i++){
a=i/1000;
b=(i-a*1000)/100;
c=(i-a*1000-b*100)/10;
d=i-a*1000-b*100-c*10;
for(j=1;j <10;j++){
for(k=0;k <10;k++){
if(i==(j*1000)+(k*100)) continue;
}
}
if(i==(a*10+b)*(c*10+d)) System.out.println(i+ "is xixuegui ");
if(i==(a*10+b)*(d*10+c)) System.out.println(i+ "is xixuegui ");
if(i==(b*10+a)*(c*10+d)) System.out.println(i+ "is xixuegui ");
if(i==(b*10+a)*(d*10+c)) System.out.println(i+ "is xixuegui ");
if(i==(a*10+c)*(b*10+d)) System.out.println(i+ "is xixuegui ");
if(i==(a*10+c)*(d*10+b)) System.out.println(i+ "is xixuegui ");
if(i==(c*10+a)*(b*10+d)) System.out.println(i+ "is xixuegui ");
if(i==(c*10+a)*(d*10+b)) System.out.println(i+ "is xixuegui ");
if(i==(a*10+d)*(b*10+c)) System.out.println(i+ "is xixuegui ");
if(i==(a*10+d)*(c*10+b)) System.out.println(i+ "is xixuegui ");
if(i==(d*10+a)*(b*10+c)) System.out.println(i+ "is xixuegui ");
if(i==(d*10+a)*(c*10+b)) System.out.println(i+ "is xixuegui ");
if(i==(b*10+c)*(a*10+d)) System.out.println(i+ "is xixuegui ");
if(i==(b*10+c)*(d*10+a)) System.out.println(i+ "is xixuegui ");
if(i==(c*10+b)*(a*10+d)) System.out.println(i+ "is xixuegui ");
if(i==(c*10+b)*(d*10+a)) System.out.println(i+ "is xixuegui ");
}
}