We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7f94b97 commit adb2515Copy full SHA for adb2515
2 files changed
프로그래머스/0/120817. 배열의 평균값/README.md
@@ -4,7 +4,7 @@
4
5
### 성능 요약
6
7
-메모리: 74.7 MB, 시간: 0.04 ms
+메모리: 74.7 MB, 시간: 0.02 ms
8
9
### 구분
10
@@ -16,7 +16,7 @@
16
17
### 제출 일자
18
19
-2026년 06월 17일 14:25:20
+2026년 06월 25일 21:22:48
20
21
### 문제 설명
22
프로그래머스/0/120817. 배열의 평균값/배열의 평균값.java
@@ -1,11 +1,7 @@
1
class Solution {
2
public double solution(int[] numbers) {
3
- double res = 0.0f;
- int sum = 0;
- for (int i: numbers) {
- sum += i;
- }
- res = (double) sum / numbers.length;
- return res;
+ double ans = 0.0;
+ for (int i: numbers) ans += i;
+ return ans / numbers.length;
}
11
0 commit comments