본문 바로가기
python-algorithm

[백준] 1296

by 무적김두칠 2021. 1. 20.

1
2
3
4
5
6
mn,cnt,name=input(),-1,""
for i in sorted([input() for _ in range(int(input()))]):
    l,o,v,e=mn.count('L')+i.count('L'),mn.count('O')+i.count('O'),+mn.count('V')+i.count('V'),mn.count('E')+i.count('E')
    cal= ((l+o)*(l+v)*(l+e)*(v+o)*(e+o)*(v+e))%100
    if (cnt<cal): cnt,name=cal,i
print(name)
cs
반응형

'python-algorithm' 카테고리의 다른 글

[백준] 1356  (0) 2021.01.20
[백준] 1312  (0) 2021.01.20
[백준] 1259  (0) 2021.01.20
[백준] 1252  (0) 2021.01.20
[백준] 1236  (0) 2021.01.20

댓글