Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
77805 sh25_zhangyy 最长单词 Python3 通过 27 MS 3680 KB 384 2025-12-26 14:50:22

Tests(3/3):


# 读取输入并去除前后空格 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)


测评信息: