1 parent 8354a19 commit e4c7af5Copy full SHA for e4c7af5
2 files changed
프로그래머스/1/12947. 하샤드 수/README.md
@@ -1,10 +1,10 @@
1
# [level 1] 하샤드 수 - 12947
2
3
-[문제 링크](https://school.programmers.co.kr/learn/courses/30/lessons/12947)
+[문제 링크](https://school.programmers.co.kr/learn/courses/30/lessons/12947?language=java)
4
5
### 성능 요약
6
7
-메모리: 10.5 MB, 시간: 0.02 ms
+메모리: 74.6 MB, 시간: 0.03 ms
8
9
### 구분
10
@@ -16,7 +16,7 @@
16
17
### 제출 일자
18
19
-2024년 06월 22일 22:34:05
+2026년 06월 21일 15:18:54
20
21
### 문제 설명
22
프로그래머스/1/12947. 하샤드 수/하샤드 수.java
@@ -0,0 +1,12 @@
+class Solution {
+ public boolean solution(int x) {
+ int res = 0;
+ int tmp = x;
+ while (tmp > 0) {
+ res += tmp % 10;
+ tmp /= 10;
+ }
+ if (x % res == 0) return true;
+ else return false;
11
12
+}
0 commit comments