[BAEKJOON] 4673 - 셀프 넘버
https://www.acmicpc.net/problem/4673 size 10000을 가지는 boolean 배열에 1~10000까지 각 자리수의 합을 계산하여, 해당 자리에 flag를 세팅하는 방법으로 구현 했다. #include #define IOS_PREDEFINE() \ ( \ (cin.tie(NULL)), \ (cout.tie(NULL)), \ (std::ios::sync_with_stdio(false)), \ (void) 0 \ ) using namespace std; const int MAX = 10001; int d(int n) { int sum = 0; sum += n; int reminder = n; while(reminder) { sum += reminder % 10; reminder..