728x90
Programmers
폰켓몬
https://school.programmers.co.kr/learn/courses/30/lessons/1845
프로그래머스
코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.
programmers.co.kr
문제
코드
def solution(nums):
maximum = len(nums) // 2
new_list = []
for i in nums:
if i not in new_list and len(new_list) < maximum:
new_list.append(i)
return len(new_list)
728x90
반응형
'Algorithm > 프로그래머스' 카테고리의 다른 글
[프로그래머스] 모의고사 - 파이썬 (0) | 2024.05.01 |
---|---|
[프로그래머스] 2016년 - 파이썬 (0) | 2024.04.30 |
[프로그래머스] 카드 뭉치 - 파이썬 (0) | 2024.04.30 |
[프로그래머스] 3진법 뒤집기 - 파이썬 (0) | 2024.04.23 |
[프로그래머스] 최대공약수와 최소공배수 - 파이썬 (0) | 2024.04.23 |