#include <stdio.h> int main() { for(int i = 10000;i<100000;i++) { int a = 10,b = 0,c = 1, sum = 0; while(a>9) { c *= 10; a = i/c;//商 b = i%c;//余数 sum += a*b; } if(sum == i) { printf("%d ",i); } } return 0; }