import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); for(int i=10000;i<=99999;i++) { int sum=0; for(int j=1;j<=5;j++) { int qian = i / (int)Math.pow(10,j); int hou = i % (int)Math.pow(10,j); sum+=qian*hou; } if(sum==i) { System.out.print(i+" "); } } } }