class Solution {
public boolean solution(int x) {
boolean answer = true;
String digit = String.valueOf(x);
int digitSum = 0;
for(int i=0; i<digit.length(); i++){
digitSum += Integer.parseInt(Character.toString(digit.charAt(i)));
}
if(x%digitSum==0)
answer = true;
else
answer = false;
return answer;
}
}