text: 
  #include <iostream>
  #include <array>
  #include <cmath> 
  
  using namespace std;
  
  #define N 10000
  
  /**
   *
   * @brief DigitNum function
   * @details 현재 주어진 N 에서 digit 숫자 확인. 현재는 10 이상.
   * @author d4r6
   * @param int number
   * @return int digit.
   *
   */
  int DigitNum(int number) 
  {
  	int i = 0;
  
  	while (number > 0) {
  		number = number / 10;
  		i++;
  	}
  
  	return i - 2;
  }
  
  /**
   *
   * @brief CalculateSelfNum function
   * @details Self Number 를 계산하는 함수.
   * @author d4r6
   * @param int digit
   * @param int i
   * @return int 계산 된 Self Number.
   *
   */
  int CalculateSelfNum(int digit, int i)
  {
  	int sum = 0;
  	int temp = i;
  
  	while (digit >= 0) {
  		sum += i / (int)pow(10, digit);
  		i = i % (int)pow(10, digit);
  		digit --;
  	}
  
  	return temp + sum;
  }
  
  /**
   *
   * @brief SetSelfNum function
   * @details Self Number 셋팅하는 함수.
   * @author d4r6
   * @param int digit
   * @param array<int> n
   * @return None.
   *
   */
  void SetSelfNum(int digit, array<int, N>& n)
  {
  	int i = 1;
  
  	while (i < N) {
  		if (CalculateSelfNum(digit, i) < N) {
  			n[CalculateSelfNum(digit, i)] = 1;
  		}
  		i++;
  	}
  }
  
  /**
   *
   * @brief FindSelfNum function
   * @details Self Number 찾는 함수.
   * @author d4r6
   * @param array<int> n
   * @return None.
   *
   */
  void FindSelfNum(array<int, N> n)
  {
  	int i = 1;
  
  	while (i < N) {
  		if (n[i] == 0) {
  			cout << i << endl;
  		}
  		i++;
  	}
  }
  
  /**
   *
   * @brief main function
   * @author d4r6
   *
   */
  int main(int argc, char* argv[])
  {
  	array<int, N> n{0};
  
  	int digit = DigitNum(N);
  	SetSelfNum(digit, n);
  	FindSelfNum(n);
  
  	return 0;
  }