#include <stdio.h> int main() { for (unsigned int i = 10000; i <= 99999; i++) { int num = 0; for (int j = 10; j <= 10000; j *= 10) { num += (i / j) * (i % j); } if (num == i) { printf("%d ", i); } } return 0; }