当前位置:网站首页>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
边栏推荐
- Explanation of redis database (I)
- What are the mobile app software testing tools? Sharing of third-party software evaluation
- Today's sleep quality record 76 points
- Recommended search common evaluation indicators
- 提取不重复的整数
- 码住收藏▏软件测试报告模板范文来了
- Leetcode学习计划之动态规划入门day3(198,213,740)
- PHP classes and objects
- Upgrade MySQL 5.1 to 5.69
- 使用 Bitnami PostgreSQL Docker 镜像快速设置流复制集群
猜你喜欢
MultiTimer v2 重构版本 | 一款可无限扩展的软件定时器
Why is IP direct connection prohibited in large-scale Internet
MySQL集群模式與應用場景
Demonstration meeting on startup and implementation scheme of swarm intelligence autonomous operation smart farm project
CVPR 2022 优质论文分享
CAP定理
Basic concepts of website construction and management
Temporal model: long-term and short-term memory network (LSTM)
IronPDF for . NET 2022.4.5455
IronPDF for .NET 2022.4.5455
随机推荐
小程序知识点积累
使用 Bitnami PostgreSQL Docker 镜像快速设置流复制集群
What is CNAs certification? What are the software evaluation centers recognized by CNAs?
regular expression
现在做自媒体能赚钱吗?看完这篇文章你就明白了
Control structure (I)
Basic concepts of website construction and management
服务器中毒了怎么办?服务器怎么防止病毒入侵?
el-tree实现只显示某一级复选框且单选
群体智能自主作业智慧农场项目启动及实施方案论证会议
Openstack command operation
为啥禁用外键约束
PHP operators
cadence SPB17.4 - Active Class and Subclass
Connectez PHP à MySQL via aodbc
What if the server is poisoned? How does the server prevent virus intrusion?
Single architecture system re architecture
Node. JS ODBC connection PostgreSQL
Summary of interfaces for JDBC and servlet to write CRUD
Upgrade MySQL 5.1 to 5.66