質問編集履歴

1

コードを変更してみました

2021/07/24 12:53

投稿

bbiiq
bbiiq

スコア51

test CHANGED
File without changes
test CHANGED
@@ -26,13 +26,15 @@
26
26
 
27
27
  if eva[i] < eva[i+1]:
28
28
 
29
+ tournament.append(eva[i+1])
30
+
31
+ else:
32
+
29
- tournament.append(eva[i])
33
+ tournament.append(eva[i])
30
-
31
- else:
34
+
32
-
33
- tournament.append(eva[i+1])
34
-
35
- eva = tournament
35
+ eva = tournament
36
+
37
+ tournament = [()]
36
38
 
37
39
  else:
38
40
 
@@ -40,13 +42,15 @@
40
42
 
41
43
  if eva[i] < eva[i+1]:
42
44
 
45
+ tournament.append(eva[i+1])
46
+
47
+ else:
48
+
43
- tournament.append(eva[i])
49
+ tournament.append(eva[i])
44
-
45
- else:
50
+
46
-
47
- tournament.append(eva[i+1])
48
-
49
- eva = tournament
51
+ eva = tournament
52
+
53
+ tournament = [()]
50
54
 
51
55
  return eva
52
56
 
@@ -126,13 +130,15 @@
126
130
 
127
131
  if eva[i] < eva[i+1]:
128
132
 
133
+ tournament.append(eva[i+1])
134
+
135
+ else:
136
+
129
- tournament.append(eva[i])
137
+ tournament.append(eva[i])
130
-
131
- else:
138
+
132
-
133
- tournament.append(eva[i+1])
134
-
135
- eva = tournament
139
+ eva = tournament
140
+
141
+ tournament = [()]
136
142
 
137
143
  else:
138
144
 
@@ -140,13 +146,15 @@
140
146
 
141
147
  if eva[i] < eva[i+1]:
142
148
 
149
+ tournament.append(eva[i+1])
150
+
151
+ else:
152
+
143
- tournament.append(eva[i])
153
+ tournament.append(eva[i])
144
-
145
- else:
154
+
146
-
147
- tournament.append(eva[i+1])
148
-
149
- eva = tournament
155
+ eva = tournament
156
+
157
+ tournament = [()]
150
158
 
151
159
  return eva
152
160