Skip links

  • Skip to primary navigation
  • Skip to content
  • Skip to footer
Menu
  • Home
  • Search
  • About
현구막 기술 블로그
현구막 기술 블로그

[Python : 프로그래머스] 두 정수 사이의 합

문제 https://programmers.co.kr/learn/courses/30/lessons/12912?language=python3 풀이 def solution(a, b): return sum([i for i in range(min(a,b), max(a,b)+1)]) 더 나은 풀이 def adder(a, b): return sum(range(mi...
2020-09-23 ~1 min read problem solvingPython프로그래머스

[Python : 프로그래머스] 두 개 뽑아서 더하기

문제 https://programmers.co.kr/learn/courses/30/lessons/68644?language=python3 풀이 def solution(numbers): from itertools import combinations return sorted(list(set(map(lambda x: x[0]+x[1],list(combina...
2020-09-23 ~1 min read problem solvingPython프로그래머스

[Python : 프로그래머스] 나누어 떨어지는 숫자 배열

문제 https://programmers.co.kr/learn/courses/30/lessons/12910 풀이 def solution(arr, divisor): answer = sorted([i for i in arr if i%divisor == 0]) return answer if len(answer) > 0 else [-1] 아 참 잘풀었다...
2020-09-23 ~1 min read problem solvingPython프로그래머스

[Python : 프로그래머스] 같은 숫자는 싫어

문제 https://programmers.co.kr/learn/courses/30/lessons/12906 풀이 def solution(arr): a = [] for i in arr : if len(a) < 1 or a[-1] != i : a.append(i) return a 더 나은 풀이 def no_continuous(s): a = [] fo...
2020-09-23 ~1 min read problem solvingPython프로그래머스

[Python : 프로그래머스] 가운데 글자 가져오기

문제 https://programmers.co.kr/learn/courses/30/lessons/12903 풀이 def solution(s): if len(s) % 2 : return s[len(s)//2] else : return s[len(s)//2-1:len(s)//2+1] 최고는 아니겠지만 이정도면 그래도 짧은 편이지 않을까 했다. 더 나은 풀...
2020-09-23 ~1 min read problem solvingPython프로그래머스
  • Previous
  • 1
  • …
  • 52
  • 53
  • 54
  • 55
  • 56
  • …
  • 59
  • Next

© 2026 현구막 기술 블로그. Powered by Jekyll & So Simple.