class Solution { public boolean solution(int x) { boolean answer = false; char[] xStr=Integer.toString(x).toCharArray(); int sum=0; for(int i=0;i<xStr.length;i++){ sum+=xStr[i]-'0'; } if(x%sum==0){ answer=true; } return answer; } }