Skip to content

Commit

Permalink
Merge pull request #44 from inthewalter/1181
Browse files Browse the repository at this point in the history
Solve #37 1181 단어정렬
  • Loading branch information
Yongho Lee committed May 6, 2019
2 parents 3c5405a + d472f59 commit 7972be8
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions problems/1181/21400564.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import sys

N = int(sys.stdin.readline())
L = []

for i in range(N):
L.append(sys.stdin.readline()[:-1])

L = sorted(L)
L = sorted(L, key=lambda x : len(x))

last_word = ''
for i in L :
if last_word != i :
print(i)

last_word = i

0 comments on commit 7972be8

Please sign in to comment.