From d472f5988400a9ee2fb1b7865e6717f1bec9da7d Mon Sep 17 00:00:00 2001 From: inthewalter <21400564@handong.edu> Date: Mon, 8 Apr 2019 14:06:32 +0900 Subject: [PATCH] Solve problem #1181 --- problems/1181/21400564.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 problems/1181/21400564.py diff --git a/problems/1181/21400564.py b/problems/1181/21400564.py new file mode 100644 index 0000000..2dfd176 --- /dev/null +++ b/problems/1181/21400564.py @@ -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