uploaded at 2022. 12. 17. 오후 10:19:02

This commit is contained in:
rl544
2022-12-17 22:19:01 +09:00
parent dd84813459
commit 66ea058d1e
+11
View File
@@ -0,0 +1,11 @@
// [문제 링크]: https://school.programmers.co.kr/learn/courses/30/lessons/12947
class Solution {
public boolean solution(int x) {
int b = 0;
for(char a : (x+"").toCharArray()){
b += Character.getNumericValue(a);
}
return (x%b==0);
}
}