-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path2018-s2.py
47 lines (40 loc) · 1.3 KB
/
2018-s2.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
flowers = int(input())
measurements = []
for i in range(flowers):
measurements.append(list(map(int, input().split())))
#print(measurements)
min_number = measurements[0][0]
row = 0
column = 0
if measurements[0][flowers-1] < min_number:
row = 0
column = flowers - 1
min_number = measurements[0][flowers - 1]
if measurements[flowers-1][0] < min_number:
row = flowers - 1
column = 0
min_number = measurements[flowers - 1][0]
if measurements[flowers-1][flowers-1] < min_number:
row = flowers - 1
column = flowers - 1
minNumber = measurements[flowers - 1][flowers - 1]
if row == 0 and column == 0:
for i in range(flowers):
for j in range(flowers):
print(measurements[i][j], end=" ")
print()
elif row == 0 and column > 0:
for i in range(flowers - 1, -1, -1):
for j in range(flowers):
print(measurements[j][i], end=" ")
print()
elif row > 0 and column > 0:
for i in range(flowers - 1, -1, -1):
for j in range(flowers - 1, -1, -1):
print(measurements[i][j], end=" ")
print()
else:
for i in range(flowers):
for j in range(flowers - 1, -1, -1):
print(measurements[j][i], end=" ")
print()