트로피 진열 파이썬1 1668-트로피 진열 (python, 파이썬) 1번: 내가 작성한 코드 (max 이용) trophies = [] left, right = 1, 1 n = int(input()) for _ in range(n): trophies.append(int(input())) max_before, highest = 0, max(trophies) for x in range(n): if max_before < trophies[x] and trophies[x] < highest: left += 1 max_before = max(trophies[:x+1]) max_before, highest = 0, max(trophies) trophies = trophies[::-1] for x in range(n): if max_before < trophies[x] and trop.. 2020. 10. 13. 이전 1 다음