Skip to content

Commit 9f2fd95

Browse files
committed
[D3] Title: [S/W 문제해결 기본] 1일차 - View, Time: 76 ms, Memory: 59,648 KB -BaekjoonHub
1 parent 2620f7d commit 9f2fd95

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# [D3] [S/W 문제해결 기본] 1일차 - View - 1206
2+
3+
[문제 링크](https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV134DPqAA8CFAYh)
4+
5+
### 성능 요약
6+
7+
메모리: 59,648 KB, 시간: 76 ms, 코드길이: 275 Bytes
8+
9+
### 제출 일자
10+
11+
2025-05-23 20:46
12+
13+
14+
15+
> 출처: SW Expert Academy, https://swexpertacademy.com/main/code/problem/problemList.do
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
for tc in range(1, 11):
2+
length = int(input())
3+
nums = list(map(int, input().split()))
4+
ans = 0
5+
6+
for i in range(2, length-2):
7+
sec = max(nums[i-2:i] + nums[i+1:i+3])
8+
if nums[i] - sec >= 0:
9+
ans += nums[i] - sec
10+
print(f"#{tc} {ans}")

0 commit comments

Comments
 (0)