https://school.programmers.co.kr/learn/courses/30/lessons/131705
프로그래머스
코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.
programmers.co.kr
from itertools import combinations
def solution(number):
result = 0
com_list = list(combinations(number, 3))
for e in com_list:
if sum(e) == 0:
result += 1
return result
728x90
반응형
'🔻Algorithm > Programmers' 카테고리의 다른 글
[Programmers] 프로그래머스 부족한 금액 계산하기 Python (0) | 2024.05.06 |
---|---|
[Programmers] 프로그래머스 성격 유형 검사하기 Python (0) | 2024.05.05 |
[Programmers] 프로그래머스 k번째수 Python (0) | 2024.05.04 |
[Programmers] 프로그래머스 가장 먼 노드 Python (0) | 2024.05.03 |
[Programmers] 프로그래머스 개미군단 Python (2) | 2024.03.24 |