블로그
- Simplified speech -Online trolls scratching one's head think hard in order to find a solution to something. Often used in questions and negative constructions.
- [프로그래머스] k번째수 참조: https://programmers.co.kr/learn/courses/30/lessons/42748 def solution(array, commands): answer = [] for command in commands: new_array = array[command[0]-1:command[1]] new_array.sort() answer.append
- [프로그래머스] 체육복 참조: https://programmers.co.kr/learn/courses/30/lessons/42862 * python 코드 def solution(n, lost, reserve set_reserve: if i-1 in set_lost: set_lost.remove(i-1); elif i+1 in set_lost: set_lost.remove(i+1); answer
- (로빈 슐츠) Robin Schulz feat. KIDDO - All We Got KIDDO - All We Got Lyrics This is all we got Dreaming 'bout a revolution in our minds This is all we Lock me out of this life institution I am angry and high on illusions Yes I hate, but hate's not a solution
- 가장 긴 팰린드롬 파이썬 이번 팰린드롬 문제는 뒤를 줄여나가는 방식입니다. def solution(s): maxnum = 0 for i in range(len(s)):#문자열 길이만큼 temp=s[i:]#앞부터 차례대로 줄여나가며 저장 for j in range(len(temp),0,-1):#임시저장 뒤부터 줄여나가며 확인 if temp[:j] == temp[:j][::-1] and j
- 2020 카카오 인턴십 수식 최대화 파이썬 이후는 연산자랑 숫자랑 연산하면 끝 import reimport itertoolsdef solution(expression): expression = re.split('([+\-\* 분리 operators = list(itertools.permutations(['+', '-', '*'],3))#연산자 순열로 만들기 result = [] for operator in
- 프로그래머스 문자열 내 마음대로 정렬하기 파이썬 "abc" 가 있으면 "b" + "abc" -> babc로 간단하게 가능 def solution(strings, n): answer = [] for i in range(len( strings)): strings[i] = strings[i][n]+strings[i] #해당 단어 앞에 추가 strings.sort() for j in range(len(strings
- 프로그래머스 나누어 떨어지는 숫자 배열 파이썬 파면 팔수록 코딩 테스트에 최적화된 언어 같음 def solution(arr, divisor): answer = [] for i in arr: if i%divisor==0: answer.append
- 깊이/너비 우선 탐색(DFS/BFS) 타겟 넘버 파이썬 가지치기와 동일합니다. 1 -1 2 0 0 -2 3 1 1 -1 1 -1 -1 -3 이런식으로 쭉 나열후 list에 넣고 count(target)으로 개수를 세면 됩니다. def solution (numbers, target): list = [0] #0으로 초기화 for i in numbers: #numbers숫자 불러와서 temp = [] #임시값 루프 돌때마다 초기화 for
- 스택/큐 기능개발 파이썬 현재 소요시간 < 다음 소요시간만 확인하면 됩니다. import mathdef solution(progresses, speeds): answer = [] time=[] for i, j in zip(progresses, speeds):#소요시간저장 time.append(math.ceil((100-i)/j)) max_time=time[0] cnt=1 for
← 이전
10 페이지