We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 520fe9c commit ad96855Copy full SHA for ad96855
프로그래머스/1/1845. 폰켓몬/README.md
@@ -4,7 +4,7 @@
4
5
### 성능 요약
6
7
-메모리: 95.3 MB, 시간: 3.40 ms
+메모리: 76.9 MB, 시간: 11.54 ms
8
9
### 구분
10
@@ -16,7 +16,7 @@
16
17
### 제출 일자
18
19
-2025년 05월 13일 22:05:38
+2025년 05월 13일 22:11:03
20
21
### 문제 설명
22
프로그래머스/1/1845. 폰켓몬/폰켓몬.java
@@ -9,17 +9,6 @@ public int solution(int[] nums) {
set.add(num);
}
11
12
- int answer = 0;
13
- int num = nums.length/2;
14
- int size = set.size();
15
-
- if(size >= num){
- answer = num;
- }else{
- answer = size;
- }
- return answer;
23
- // return 0;
+ return (set.size() >= nums.length/2)? nums.length/2 : set.size();
24
25
0 commit comments