We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2ea6926 commit 432ef48Copy full SHA for 432ef48
2 files changed
프로그래머스/1/12910. 나누어 떨어지는 숫자 배열/README.md
@@ -4,7 +4,7 @@
4
5
### 성능 요약
6
7
-메모리: 10.1 MB, 시간: 0.03 ms
+메모리: 14.9 MB, 시간: 1.71 ms
8
9
### 구분
10
@@ -16,7 +16,7 @@
16
17
### 제출 일자
18
19
-2024년 06월 26일 11:15:43
+2026년 07월 14일 12:05:55
20
21
### 문제 설명
22
프로그래머스/1/12910. 나누어 떨어지는 숫자 배열/나누어 떨어지는 숫자 배열.py
@@ -1,8 +1,8 @@
1
def solution(arr, divisor):
2
ans = []
3
- for i in arr:
- if i % divisor == 0:
- ans.append(i)
+ for num in arr:
+ if num % divisor == 0:
+ ans.append(num)
if len(ans) == 0:
- ans.append(-1)
+ return [-1]
return sorted(ans)
0 commit comments