-->
当前位置:首页 > 题库 > 正文内容

编程题:最长的单词

Luz3年前 (2022-10-29)题库621
输入一个字符串,将此字符串中最长的单词输出。要求至少使用一个自定义函数。

### 输入格式:
测试数据有多组,处理到文件尾。每组测试数据输入一个字符串(长度不超过80)。

### 输出格式:
对于每组测试,输出字符串中的最长单词,若有多个长度相等的最长单词,输出最早出现的那个。这里规定,单词只能由大小写英文字母构成。

### 输入样例:
in
Keywords insert, two way insertion sort,
Abstract This paper discusses three method for two way insertion
words. insert, two way sorted.



### 输出样例:
out
insertion
discusses
insert







答案:若无答案欢迎评论

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。