목록2024/12/21 (3)
susinlee 님의 블로그
[문제]https://school.programmers.co.kr/learn/courses/30/lessons/133502 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr [풀이]1. 재료를 하나씩 꺼내와서 리스트 안에 넣고2. 끝에 4개 부분만 가져와서 [1, 2, 3, 1]과 같은지 확인 한 뒤3. 같으면 끝에 4개 부분을 지워주고 카운트를 1 증가시킨다 def solution(ingredient): food = [] cnt = 0 for z in ingredient: food.append(z) if food[-4:] == [1, 2, 3..

https://leetcode.com/problems/average-time-of-process-per-machine/description/ [문제]There is a factory website that has several machines each running the same number of processes. Write a solution to find the average time each machine takes to complete a process.The time to complete a process is the 'end' timestamp minus the 'start' timestamp. The average time is calculated by the total time to c..
https://leetcode.com/problems/rising-temperature/description/ [문제] Write a solution to find all dates' id with higher temperatures compared to its previous dates (yesterday).Return the result table in any order.The result format is in the following example. 1. diff() 함수는 연속된 행의 값의 차이를 계산하는 함수. 즉 이전 행과의 현재 행의 차이를 계산→ 현재행 값 - 이전행 값 Pandasimport pandas as pddef rising_temperature(weather: pd.DataFr..