DP1 구름레벨 '징검다리건너기' 파이썬 풀이 https://level.goorm.io/exam/49112/%EC%A7%95%EA%B2%80%EB%8B%A4%EB%A6%AC-%EA%B1%B4%EB%84%88%EA%B8%B0/quiz/1 구름LEVEL 난이도별 다양한 문제를 해결함으로써 SW 역량을 향상시킬 수 있습니다. level.goorm.io n = int(input()) stones = list(map(int, input().split())) for i in range(3, n): stones[i] += min(stones[i-3:i]) print(min(stones[-3:])) ''' 처음엔 재귀함수로 풀었는데, 5번부터 런타임에러가 나와서 동적계획으로 풀게 되었다. ''' 2023. 8. 30. 이전 1 다음