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/42862?language=python3 풀이 def solution(n, lost, reserve): ht = {} for i in range(1, n+1): ht[i] = 1 if i in lost : ht[i] -= 1 if i in reserve :...
2020-09-23 1 min read problem solvingPython프로그래머스

[Python : 프로그래머스] 문자열 다루기 기본

문제 https://programmers.co.kr/learn/courses/30/lessons/12918?language=python3 풀이 def solution(s): return s.isdigit() and (len(s) == 4 or len(s) == 6) 더 나은 풀이 def solution(s): return s.isdigit() and ...
2020-09-23 ~1 min read problem solvingPython프로그래머스

[Python : 프로그래머스] 문자열 내림차순으로 배치하기

문제 https://programmers.co.kr/learn/courses/30/lessons/12917?language=python3 풀이 def solution(s): return "".join(sorted(s, reverse=True)) 문제 조건 중에 “대문자는 더 작은 것으로 간주합니다.”가 있길레 ASCII를 기준으로 정렬되겠거니 하고 r...
2020-09-23 ~1 min read problem solvingPython프로그래머스

[Python : 프로그래머스] 문자열 내 마음대로 정렬하기

문제 https://programmers.co.kr/learn/courses/30/lessons/12915?language=python3 풀이 def solution(strings, n): return sorted(sorted(strings), key=lambda x: x[n]) sorted 함수는 기본적으로 완전정렬이므로, 한 번 단어의 사전 순으로...
2020-09-23 ~1 min read problem solvingPython프로그래머스

[Python : 프로그래머스] 문자열 내 p와 y의 개수

문제 https://programmers.co.kr/learn/courses/30/lessons/12916?language=python3 풀이 def solution(s): return s.lower().count('p') == s.lower().count('y') 점점 파이써닉이 손에 익는거 같다! 중고딩 땐 “갯수”가 표준어였는데, 새내기 때 “개...
2020-09-23 ~1 min read problem solvingPython프로그래머스
  • Previous
  • 1
  • …
  • 51
  • 52
  • 53
  • 54
  • 55
  • …
  • 59
  • Next

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