Sort by

recency

|

4511 Discussions

|

  • + 0 comments
    if __name__ == '__main__':
        student = []
        s = set()
        for _ in range(int(input())):
            name = input()
            score = float(input())
            student.append([name, score])
            s.add(score)
            
        low_score = sorted(s)[1]
        low_names = []
        
        for name,score in student:
            if score == low_score:
                low_names.append(name)
        
        for name in sorted(low_names):
            print(name) 
    
  • + 1 comment
    if __name__ == '__main__':
        students = [(input(), float(input())) for _ in range(int(input()))]
        scores = set(map(lambda x: x[1], sorted(students, key=lambda x: x[1])))
        scores.remove(min(scores))
        print(*sorted(map(lambda x: x[0], filter(lambda x: x[1] == min(scores), students))), sep='\n')
    
  • + 0 comments
    if __name__ == '__main__':
        list=[]
        second_lowest = int()
        
        for _ in range(int(input())):
            name = input()
            score = float(input())
            list.append([name, score])
            
        list.sort(key=lambda score: score[1])
        lowest = list[0][1]
        
        for name, score in list:
            if score > lowest:
                second_lowest = score
                break
        second_lowest_list = [name for name, score in list if score == second_lowest]
        second_lowest_list.sort()
        for name in second_lowest_list:
            print(name)
            
    
  • + 0 comments

    if name == 'main': list=[] second_lowest = int()

    for _ in range(int(input())):
        name = input()
        score = float(input())
        list.append([name, score])
    
    list.sort(key=lambda score: score[1])
    lowest = list[0][1]
    
    for name, score in list:
        if score > lowest:
            second_lowest = score
            break
    second_lowest_list = [name for name, score in list if score == second_lowest]
    second_lowest_list.sort()
    for name in second_lowest_list:
        print(name)
    
  • + 0 comments
    if __name__ == '__main__':
        student=[]
        for _ in range(int(input())):
            name = input()
            score = float(input())
            student.append([name,score])
        score =[i[1] for i in student]
        unique_scores= sorted(set(score))
        second_lowest_score = unique_scores[1]
        second_lowest_students=[i[0] for i in student if i[1] == second_lowest_score]
        second_lowest_students.sort()
        for student_name in second_lowest_students:
            print(student_name)