We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents fdddcaa + 25f1966 commit fbe8d06Copy full SHA for fbe8d06
learntosurf/Baekjoon/4_1차원_배열 /10818.py
@@ -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
17
18
+print(min(numbers),max(numbers))
learntosurf/Baekjoon/4_1차원_배열 /10871.py
@@ -0,0 +1,7 @@
+N, X = map(int, input().split())
+A = input()
+for i in map(int, A.split()):
+ if i < X:
+ print(i, end=' ')
0 commit comments