Skip to content

Commit b8a80c0

Browse files
authored
[BOJ] 최소, 최대/브 론즈3/10분(∆) -m "https://www.acmicpc.net/problem/10818"
1 parent 335e545 commit b8a80c0

File tree

1 file changed

+18
-0
lines changed
  • learntosurf/Baekjoon/4_1차원_배열

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# 내 풀이
2+
cnt = int(input())
3+
numbers = list(map(int, input().split()))
4+
max = numbers[0]
5+
min = numbers[0]
6+
7+
for i in numbers[1:]:
8+
if i > max:
9+
max = i
10+
elif i < min:
11+
min = i
12+
13+
print(min,max)
14+
15+
# 다른 풀이
16+
cnt = int(input())
17+
numbers = list(map(int, input().split()))
18+
print(min(numbers),max(numbers))

0 commit comments

Comments
 (0)