[문제]

[풀이]
def solution(nums):
answer = 0
not_duplication = []
my_pocketmon = len(nums) // 2
for i in nums:
if i not in not_duplication:
not_duplication.append(i)
return min(my_pocketmon, len(not_duplication))
[링크]
https://school.programmers.co.kr/learn/courses/30/lessons/1845
프로그래머스
SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프
programmers.co.kr
'CodingTest > Programmers' 카테고리의 다른 글
| [프로그래머스 Lv1] 카드 뭉치(python, 구현) (0) | 2025.08.07 |
|---|---|
| [프로그래머스 Lv1] 비밀지도(python, 구현) (0) | 2025.08.07 |
| [프로그래머스 Lv1] 기사단원의 무기(python, 구현) (0) | 2025.08.07 |
| [프로그래머스 Lv1] 모의고사(python, 완전탐색) (0) | 2025.08.07 |
| [프로그래머스 Lv1] 2016년(python, 구현) (0) | 2025.08.07 |
