반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- 브루트포스
- dfs
- N과M
- 스택
- 가상메모리 관리
- level3
- 구현
- 운영체제
- 그리디
- 힙
- 프로그래머스
- 다익스트라
- DP
- BOJ
- 재귀
- level0
- 에라스토테네스의 체
- level2
- MYSQL
- programmers
- 코딩테스트
- 수학
- 파이썬
- level1
- 딕셔너리
- python
- BFS
- 다이나믹 프로그래밍
- 백준
- 가상메모리
Archives
- Today
- Total
동캄의 코딩도장
프로그래머스 level1 [삼총사] 파이썬 본문
반응형
https://school.programmers.co.kr/learn/courses/30/lessons/131705
프로그래머스
코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.
programmers.co.kr
# 프로그래머스 level1 삼총사
from itertools import combinations
def solution(number):
answer = 0
combi=combinations(number,3)
for c in combi:
if sum(c)==0:
answer+=1
return answer
combinations 라이브러리를 이용하여 해결하였다.
반응형
'코테 > 프로그래머스' 카테고리의 다른 글
프로그래머스 level1 [콜라 문제] 파이썬 (0) | 2023.04.04 |
---|---|
프로그래머스 level1 [크기가 작은 부분 문자열] 파이썬 (0) | 2023.04.04 |
프로그래머스 level1 [둘만의 암호] 파이썬 (0) | 2023.03.18 |
프로그래머스 level1 [개인정보 수집 유효기간] 파이썬 (0) | 2023.03.16 |
프로그래머스 level1 [대충만든자판] 파이썬 (0) | 2023.03.12 |