We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
  • HackerRank Home

    HackerRank

  • |
  • Prepare
  • Certify
  • Compete
  • Hiring developers?
  1. Prepare
  2. Python
  3. Basic Data Types
  4. Nested Lists
  5. Discussions

Nested Lists

Problem
Submissions
Leaderboard
Discussions
Editorial
Tutorial

    You are viewing a single comment's thread. Return to all comments →

  • aa3377
    2 months ago+ 0 comments
    if __name__ == '__main__':
        a=[]
        b=[]
        for i in range(int(input())):
            name = input()
            score = float(input())
            a.append([name,score])
            b.append(a[i][1])
        b.sort()
        b=set(b)
        c=list(b)
        d=[]
        for i in range(len(a)):
            if c[1]==a[i][1]:
                d.append(a[i][0])
        d.sort()
        for i in range(len(d)):  
            print(d[i])
    
    -1|
    Permalink
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy