2018~2019/Level 1
하샤드 수 [JavaScript]
전기도둑
2018. 10. 2. 16:52
1 2 3 4 | function solution(x) { return x % x.toString().split('').reduce((a,b) => parseInt(a)+parseInt(b)) === 0 ? true : false; } |