• Home
  • About
    • JOOS photo

      JOOS

      Joos's blog

    • Learn More
    • Email
    • Github
  • Posts
    • All Posts
    • All Tags
  • Projects

[백준] 10814번 : 나이순 정렬 with python3

24 Oct 2018

Reading time ~1 minute

문제: https://www.acmicpc.net/problem/10814

import sys
read = lambda : sys.stdin.readline().strip()

ans=[]
for _ in range(int(read())):
    a, n = read().split()
    ans.append((int(a),n))
for a, n in sorted(ans, key=lambda i: i[0]):
    print(a, n)


algorithm백준 Share Tweet +1