当前位置:网站首页>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
边栏推荐
- 多生成树MSTP的配置
- c语言---字符串+内存函数
- 北京某信护网蓝队面试题目
- 布隆过滤器在亿级流量电商系统的应用
- Common types of automated testing framework ▏ automated testing is handed over to software evaluation institutions
- Openstack command operation
- Redis主从复制过程
- fatal error: torch/extension. h: No such file or directory
- Connect PHP to MySQL via PDO ODBC
- Why disable foreign key constraints
猜你喜欢
IronPDF for . NET 2022.4.5455
多生成树MSTP的配置
Squid agent
G007-hwy-cc-estor-03 Huawei Dorado V6 storage simulator construction
幂等性的处理
JVM-第2章-类加载子系统(Class Loader Subsystem)
Temporal model: long-term and short-term memory network (LSTM)
CAP定理
Mysql database explanation (VII)
Neodynamic Barcode Professional for WPF V11.0
随机推荐
Upgrade MySQL 5.1 to 5.67
多生成树MSTP的配置
时序模型:长短期记忆网络(LSTM)
时序模型:门控循环单元网络(GRU)
mysql乐观锁解决并发冲突
Cookie&Session
PHP PDO ODBC loads files from one folder into the blob column of MySQL database and downloads the blob column to another folder
Advantages, disadvantages and selection of activation function
移动app软件测试工具有哪些?第三方软件测评小编分享
Basic concepts of website construction and management
幂等性的处理
utils.DeprecatedIn35 因升级可能取消,该如何办
一刷314-剑指 Offer 09. 用两个栈实现队列(e)
【Leetcode-每日一题】安装栅栏
【AI周报】英伟达用AI设计芯片;不完美的Transformer要克服自注意力的理论缺陷
T2 icloud calendar cannot be synchronized
激活函数的优缺点和选择
Explanation of redis database (I)
自主作业智慧农场创新论坛
考试考试自用