TIL 20240927

·2024년 9월 27일

TIL

목록 보기
23/25

🖥️ 1.Today I Learned

-알고리즘,SQL 문제 풀기

https://school.programmers.co.kr/learn/courses/30/lessons/135808

def solution(k, m, score):
    answer = 0
    
    score.sort(reverse=True)
    
    for i in range(0, len(score), m):
        if i + m <= len(score):
            box = score[i:i+m]
            min_score = min(box)  
            answer += min_score * m 
            
    return answer

https://school.programmers.co.kr/learn/courses/30/lessons/59042

select o.animal_id, o.name 
from animal_outs o
where o.animal_id not in (select i.animal_id from animal_ins i)
order by o.animal_id
profile
🍀🍀

0개의 댓글