HR파이썬 Nested Lists

개요[ | ]

HR파이썬 Nested Lists
해커랭크 Python
# 문제 비고
HR파이썬 Basic Data Types e
8 HR파이썬 List Comprehensions
9 HR파이썬 Find the Runner-Up Score!
10 HR파이썬 Nested Lists
11 HR파이썬 Finding the percentage
12 HR파이썬 Lists
13 HR파이썬 Tuples

if __name__ == '__main__':
    students = []
    for _ in range(int(input())):
        name = input()
        score = float(input())
        students.append([name,score])
    lowest2 = sorted(list(set(map(lambda x: x[1], students))))[1]
    for name in sorted([s[0] for s in students if s[1] == lowest2]):
        print( name )
if __name__ == '__main__':
    students = []
    for _ in range(int(input())):
        name = input()
        score = float(input())
        students.append([name,score])
    scores = list(set([s[1] for s in students]))
    scores.sort()
    names = [s[0] for s in students if s[1] == scores[1]]
    names.sort()
    for name in names:
        print( name )
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}