알고리즘 문제 풀이/1DP_과제(~180615)
171011_4673_셀프 넘버
#include bool SN[10001];int d(int n){ int dn=n; if(n>=10000) { dn += n/10000; n %= 10000;} if(n>=1000) { dn += n/1000; n %= 1000;} if(n>=100) { dn += n/100; n %= 100;} if(n>=10) {dn += n/10; n %= 10;} return dn += n;}int main(){ for(int i=1; i=10000) { dn += n/10000; n %= 10000;} if(n>=1000) { dn += n/1000; n %= 1000;} if(n>=100) { dn += n/100; n %= 100;} if(n>=10) {dn += n/10; n %= 10;} return ..