프로그래머스146 2025 프로그래머스 코드챌린지 2차 예선 > 서버 증설 횟수 - Python, 구현 https://school.programmers.co.kr/learn/courses/30/lessons/389479 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr 코드 & 풀이 def solution(players, m, k): answer = 0 size = len(players) servers = [0] * size def server_expansion(need_server, start): for idx in range(k): if start + idx = m: need_server = (player // m) - s.. 2025. 2. 15. 2025 프로그래머스 코드챌린지 1차 예선 > 비밀 코드 해독 - Python, Combinations, & 연산 https://school.programmers.co.kr/learn/courses/30/lessons/388352#qna 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr 코드 & 풀이 from itertools import combinationsdef solution(n, q, ans): possible_code = list(combinations(range(1, n + 1), 5)) total_cnt = 0 for code in possible_code: make_code = True for i in range(len(q)): if.. 2025. 2. 14. 2025 프로그래머스 코드챌린지 1차 예선 > 유연근무제 - Python, 구현 https://school.programmers.co.kr/learn/courses/30/lessons/388351 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr 코드 & 풀이 def solution(schedules, timelogs, startday): answer = 0 new_schedules = [] for schedule in schedules: hour = schedule // 100 minute = schedule % 100 minute = (minute + 10) % 60 hour += (schedule % 10.. 2025. 2. 12. 2025 프로그래머스 코드챌린지 1차 예선 > 지게차와 크레인 - Python, BFS https://school.programmers.co.kr/learn/courses/30/lessons/388353 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr 코드 & 풀이 from collections import dequedef solution(storage, requests): N, M = len(storage), len(storage[0]) new_storage = [list(row) for row in storage] answer = N * M # 전체 칸 개수 def can_go_outside(tmp_storage, i, j): direct =.. 2025. 2. 12. 고고학 최고의 발견 - Python, product https://school.programmers.co.kr/learn/courses/30/lessons/131702 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr 코드 & 풀이 from itertools import productimport copydef solution(clockHands): N = len(clockHands) direct = [(-1, 0), (1, 0), (0, 0), (0, -1), (0, 1)] # 위, 아래, 현재, 왼쪽, 오른쪽 def rotate(board, x, y, count): for dx, dy in direct: .. 2025. 2. 10. 2018 KAKAO BLIND RECRUITMENT > 파일명 정렬 - Python, 정규식 https://school.programmers.co.kr/learn/courses/30/lessons/17686 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr 코드 & 풀이 import redef solution(files): cuted_files = [] for i, file in enumerate(files): cuted_file = re.findall(r'[^0-9]+|\d+',file) #문자와 숫자를 기준으로 분리 HEAD = cuted_file[0].lower() # HEAD 소문자, 대문자 구분없으니까 다 소문자로 N.. 2025. 1. 7. 이전 1 2 3 4 5 6 ··· 25 다음