| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 78416 | sh25_shenpy | 最长单词 | C++ | Accepted | 0 MS | 248 KB | 422 | 2025-12-26 15:45:11 |
#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; }