最长&最短文本

Time Limit: 1000ms
Memory Limit: 32768KB
64-bit integer IO format: %lld      Java class name: Main

Description

输入多行字符串,请按照原文本中的顺序输出其中最短和最长的字符串,如果最短和最长的字符串不止一个,请全部输出。

Input

输入包括多行字符串,字符串的长度len,(1<=len<=1000)。

Output

按照原文本中的顺序输出其中最短和最长的字符串,如果最短和最长的字符串不止一个,请全部输出。

Sample Input

hello
she
sorry
he

Sample Output

he
hello
sorry

Author

Admin
Language: 
Theme: 
Share Code? 

Powered by NB231 | Current Style: .