当前位置:网站首页>String sorting
String sorting
2022-04-23 15:40:00 【Ye Ningxia Xin】
describe
Given n A string , Yes, please. n Strings in dictionary order .
Data range : 1≤n≤1000 , The string length satisfies 1≤len≤100
Input description :
Enter the first line as a positive integer n(1≤n≤1000), below n Behavior n A string ( String length ≤100), The string contains only uppercase and lowercase letters .
Output description :
Data output n That's ok , The output is a string in dictionary order .
Example 1
Input :
9 cap to cat card two too up boat boot
Output :
boat boot cap card cat to too two up
n = int(input())
list = []
if 1 <= n <= 1000 :
for i in range(n):
b = input()
if 1 <= len(b) <= 100:
list.append(b)
list.sort()
# for j in list:
# print(j)
print('\n'.join(list))
Python Medium .join() usage _chixujohnny The blog of -CSDN Blog _.join()
版权声明
本文为[Ye Ningxia Xin]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231534071476.html
边栏推荐
- c语言---指针进阶
- MySQL Cluster Mode and application scenario
- Control structure (I)
- 码住收藏▏软件测试报告模板范文来了
- Leetcode学习计划之动态规划入门day3(198,213,740)
- What is CNAs certification? What are the software evaluation centers recognized by CNAs?
- Code live collection ▏ software test report template Fan Wen is here
- Connectez PHP à MySQL via aodbc
- Node.js ODBC连接PostgreSQL
- Explanation of redis database (I)
猜你喜欢
随机推荐
大型互联网为什么禁止ip直连
Code live collection ▏ software test report template Fan Wen is here
cadence SPB17.4 - Active Class and Subclass
Rsync + inotify remote synchronization
Upgrade MySQL 5.1 to 5.69
pywintypes.com_error: (-2147221020, ‘无效的语法‘, None, None)
Multi level cache usage
山寨版归并【上】
Go语言切片,范围,集合
utils.DeprecatedIn35 因升级可能取消,该如何办
什么是CNAS认证?CNAS认可的软件测评中心有哪些?
码住收藏▏软件测试报告模板范文来了
服务器中毒了怎么办?服务器怎么防止病毒入侵?
基础贪心总结
Machine learning - logistic regression
大厂技术实现 | 行业解决方案系列教程
幂等性的处理
Cookie&Session
pgpool-II 4.3 中文手册 - 入门教程
Connect PHP to MSSQL via PDO ODBC