| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 77857 | sh25_wangtaojie | 最长单词 | C++ | Accepted | 0 MS | 256 KB | 424 | 2025-12-26 14:54:36 |
#include <iostream> #include <string> #include <sstream> using namespace std; int main() { string sentence; getline(cin, sentence); sentence.pop_back(); // 去除句号 stringstream ss(sentence); string word; string longest; while (ss >> word) { if (word.length() > longest.length()) { longest = word; } } cout << longest; return 0; }