https://www.acmicpc.net/problem/4673
public class Main {
static int d(int n){
int num=n;
while(n>0){
num+=n%10;
n/=10;
}
return num;
}
public static void main(String args[]) {
for(int i=1;i<=10000;i++){
int count=0;
for(int j=1;j<=10000;j++){
if(i==d(j)){
count=0;
break;
}
else count=1;
}
if(count==1) System.out.println(i);
}
}
}