-
Notifications
You must be signed in to change notification settings - Fork 1
/
mjehuric.py
executable file
·61 lines (59 loc) · 1.38 KB
/
mjehuric.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
memo = [int(i) for i in input().split()]
final = [1, 2, 3, 4, 5]
while memo != final:
if memo[0] > memo[1]:
memo[0], memo[1] = memo[1], memo[0]
for_print = (
str(memo[0])
+ " "
+ str(memo[1])
+ " "
+ str(memo[2])
+ " "
+ str(memo[3])
+ " "
+ str(memo[4])
)
print(for_print)
if memo[1] > memo[2]:
memo[1], memo[2] = memo[2], memo[1]
for_print = (
str(memo[0])
+ " "
+ str(memo[1])
+ " "
+ str(memo[2])
+ " "
+ str(memo[3])
+ " "
+ str(memo[4])
)
print(for_print)
if memo[2] > memo[3]:
memo[2], memo[3] = memo[3], memo[2]
for_print = (
str(memo[0])
+ " "
+ str(memo[1])
+ " "
+ str(memo[2])
+ " "
+ str(memo[3])
+ " "
+ str(memo[4])
)
print(for_print)
if memo[3] > memo[4]:
memo[3], memo[4] = memo[4], memo[3]
for_print = (
str(memo[0])
+ " "
+ str(memo[1])
+ " "
+ str(memo[2])
+ " "
+ str(memo[3])
+ " "
+ str(memo[4])
)
print(for_print)