https://programmers.co.kr/learn/courses/30/lessons/42748
프로그래머스
코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.
programmers.co.kr
1
2
3
4
5
6
7
8
9
10
11
|
def solution(array, commands):
answer = []
arr = []
for i in range(len(commands)) :
start = commands[i][0]
finish = commands[i][1]
pick = commands[i][2]
arr = array[start-1:finish]
arr = sorted(arr)
return answer
|
오늘도 기나긴 코드 ^-^
다른 코드를 봐봅시다
1
2
3
4
5
6
|
def solution(array, commands):
answer = []
for command in commands:
i,j,k = command
return answer
|
와 이거야말로 파이썬의 정석 정답인 거 같다,,,,
'정보보안 > 파이썬' 카테고리의 다른 글
프로그래머스 - 문자열 다루기 기본 (0) | 2020.04.08 |
---|---|
프로그래머스 - 2016년 (0) | 2020.04.04 |
프로그래머스 - 수박수박수박수박수 (0) | 2020.04.01 |
프로그래머스 - 약수의 합 (0) | 2020.04.01 |
프로그래머스 - 서울에서 김서방 찾기 (0) | 2020.04.01 |
댓글