uploaded at 2022. 12. 17. 오후 10:19:02
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user