1
+ '''
2
+ 2021.1.12. SJLEE
3
+ # N x M cards. N: #rows, M: #cols
4
+ # select the row, then pick the card with smallest value.
5
+ # input is given in line by line manner.
6
+ # goal: pick up the most large value.
7
+ '''
8
+
9
+
10
+ '''
11
+ print("N, M :")
12
+ # select row and col
13
+ N, M = map(int, input().split())
14
+
15
+ # dynamically create 2-dimensional list
16
+ _list = list()
17
+ for row in range(N):
18
+ _list[][col].extend(list(map(int,input().split()))) # 한 list에 list를 concatenate하는 연산
19
+ #_list.append(int(input())) # 한 list에 한 값을 추가하는 연산
20
+ #_list += [[0]*M] # 두 list를 합치는 연산 , *는 반복 연산자
21
+ print("len: ", len(_list))
22
+ print("_list = ", _list)
23
+ '''
24
+
25
+ print ("N, M :" )
26
+ # select row and col
27
+ N , M = map (int , input ().split ())
28
+
29
+ # dynamically create 2-dimensional list
30
+ _list = list ()
31
+ for col in range (M ):
32
+ _list = [ [] for row in range (N )] # List comprehension
33
+
34
+ for row in range (N ):
35
+ _list [row ].extend (list (map (int ,input ().split ())))
36
+ # input().split()을 통해 한 줄씩 받고
37
+ # map(int, ~)을 통해 한 줄을 통째로 int 변환
38
+ # list(~~)을 통해 explicit하게 형 변환
39
+ # _list[0], _list[1], _list[2]에 각각의 list를 extend해 줌
40
+ # initial _list는 비어있는 리스트
41
+
42
+ for row in range (N ):
43
+ print (_list [row ])
44
+
45
+ result = 0
46
+ for row in range (N ):
47
+ min_tmp = min (_list [row ]) # list를 int로 형변환 해 주는듯.
48
+ result = max (min_tmp , result )
49
+
50
+ print (result )
51
+
52
+ '''
53
+ # not working code section
54
+ result = 101
55
+ for data in _list:
56
+ result = min(result, data)
57
+ print(result)
58
+ '''
59
+
60
+ '''
61
+ # original from dongbin Na
62
+ # 단일 for문, 한 줄 입력받을 때 마다 min value찾기
1
63
# N, M을 공백을 기준으로 구분하여 입력 받기
2
64
n, m = map(int, input().split())
3
65
11
73
result = max(result, min_value)
12
74
13
75
print(result) # 최종 답안 출력
76
+ '''
77
+
78
+ '''
79
+ # original from dongbin Na
80
+ # 이중 for문, 한 줄 입력받을 때 마다 min value찾기
81
+ # N, M을 공백을 기준으로 구분하여 입력 받기
82
+ n, m = map(int, input().split())
83
+
84
+ result = 0
85
+ # 한 줄씩 입력 받아 확인하기
86
+ for i in range(n):
87
+ data = list(map(int, input().split()))
88
+ # 현재 줄에서 '가장 작은 수' 찾기
89
+ min_value = 10001
90
+ for a in data:
91
+ min_value = min(min_value, a)
92
+ # '가장 작은 수'들 중에서 가장 큰 수 찾기
93
+ result = max(result, min_value)
94
+
95
+ print(result) # 최종 답안 출력
96
+ '''
0 commit comments