Last time It's been a week today.
#7 Problem
** Thoughts ** I know that Python sort can also be done for strings, so I sort it. All strings have the same length, so you can just connect the sorted ones.
n, l = map(int,input().split())
s = [input() for _ in range(n)]
s.sort()
ans = ''
for i in range(n):
ans = ans + s[i]
print(ans)
I feel that it was the shortest commentary. I'm not good at manipulating character strings, so I want to devote myself to it. see you
Recommended Posts