当前位置:网站首页>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
边栏推荐
猜你喜欢

大厂技术实现 | 行业解决方案系列教程

Openstack theoretical knowledge

Demonstration meeting on startup and implementation scheme of swarm intelligence autonomous operation smart farm project

KNN, kmeans and GMM

IronPDF for . NET 2022.4.5455

时序模型:门控循环单元网络(GRU)

Deep learning - Super parameter setting

Recommended search common evaluation indicators

Why is IP direct connection prohibited in large-scale Internet

MySQL集群模式与应用场景
随机推荐
Mumu, go all the way
Mysql database explanation (IX)
How did the computer reinstall the system? The display has no signal
如果conda找不到想要安装的库怎么办PackagesNotFoundError: The following packages are not available from current
What role does the software performance test report play? How much is the third-party test report charged?
Codejock Suite Pro v20.3.0
导入地址表分析(根据库文件名求出:导入函数数量、函数序号、函数名称)
Cookie&Session
Squid agent
Neodynamic Barcode Professional for WPF V11. 0
php类与对象
Modèle de Cluster MySQL et scénario d'application
MySQL集群模式与应用场景
Educational codeforces round 127 A-E problem solution
电脑怎么重装系统后显示器没有信号了
Connect PHP to MySQL via PDO ODBC
自动化测试框架常见类型▏自动化测试就交给软件测评机构
pywintypes.com_error: (-2147221020, ‘无效的语法‘, None, None)
一刷313-剑指 Offer 06. 从尾到头打印链表(e)
CAP定理