강의로 돌아가기

### 1,2 그리고 마지막 문제만 해결되는데 이유를 모르겠네요

장르별 두곡씩, 같은 플레이를 가진 곡은 작은 유효번호부터 출력도 했는데 뭐가 문제일까요?

###### 작성중인 코드―solution.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
import copy
from collections import Counter
def solution(genres, plays):
answer, fi, se = [], [], []
co = Counter()

for i, j in enumerate(genres):
co += {j : plays[i]}

big1 = co.most_common()[0][0]
big2 = co.most_common()[1][0]

player = copy.deepcopy(plays)
plays_cp = copy.deepcopy(plays)
player.sort()

for i in reversed(player):
key = plays_cp.index(i)
if genres[key] == big1:
fi.append(key)
elif genres[key] == big2:
se.append(key)
plays_cp[key] = 0
print(plays_cp)

if len(fi) == 1:
elif len(fi) == 2:
else:
for i in range(2):
if plays[fi[i]] == plays[fi[i+1]]:
if fi[i] < fi[i+1]:
else:
fi[i], fi[i+1] = fi[i+1], fi[i]
else:

if len(se) == 1:
elif len(se) == 2:
else:
for i in range(2):
if plays[se[i]] == plays[se[i+1]]:
if se[i] < se[i+1]: