马虎的算式(Sloppy formula)

如下
package 算式;

public class test {
public static void main(String[] args) {
/*
* abcde = adbce
*
* /
long a,b,c,d,e;
int sum = 0;
for(a = 1;a < 10;a++ ){
for(b = 1;b < 10;b++ ){
for(c = 1;c < 10;c++){
for(d = 1;d < 10;d++) {
for(e = 1;e < 10;e++) {
if(a!=b&&a!=c&&a!=d&&a!=e&&b!=c&&b!=d&&b!=e&&c!=d&&c!=e&&d!=e) {
if((a10+b)(c100+d10+e)==(a100+d10+b)(c*10+e)) {
sum+=1;
}
}

					}
				}
				
			}
		}
		
	}
	System.out.println(sum);
	
}

}

————————

as follows
Package formula;

public class test {
public static void main(String[] args) {
/*
* abcde = adbce
*
* /
long a,b,c,d,e;
int sum = 0;
for(a = 1;a < 10;a++ ){
for(b = 1;b < 10;b++ ){
for(c = 1;c < 10;c++){
for(d = 1;d < 10;d++) {
for(e = 1;e < 10;e++) {
if(a!=b&&a!=c&&a!=d&&a!=e&&b!=c&&b!=d&&b!=e&&c!=d&&c!=e&&d!=e) {
if((a10+b)(c100+d10+e)==(a100+d10+b)(c*10+e)) {
sum+=1;
}
}

					}
				}
				
			}
		}
		
	}
	System.out.println(sum);
	
}

}