提交时间:2025-12-26 14:50:22

运行 ID: 77805

# 读取输入并去除前后空格 sentence = input().strip() # 去掉句尾的句点 words_str = sentence[:-1] # 分割成单词列表 words = words_str.split() max_length = 0 longest_word = "" for word in words: current_length = len(word) if current_length > max_length: max_length = current_length longest_word = word print(longest_word)