求英文句子中的最长单词
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
求英文句子中的最长单词
问题描述
给定一个英文句子(长度不超过255),句子仅包含字母和空格。要求输出句子中最长的单词:
- 若存在多个长度相同的最长单词,输出最先出现的那个。
输入描述
一行字符串,仅由字母(含大小写)和空格组成。
输出描述
一行字符串,表示句子中最长的单词(保留原单词的大小写形式)。
输入样例1
in which four coins
输出样例1
which
输入样例2
Hello World Python Code
输出样例2
Python
输入样例3
A aa aaa aaaa
输出样例3
aaaa
初中组冲刺
- Status
- Done
- Rule
- ACM/ICPC
- Problem
- 8
- Start at
- 2025-5-22 16:15
- End at
- 2025-5-24 8:15
- Duration
- 40 hour(s)
- Host
- Partic.
- 37