| Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 82504 | sh25_wuyy | 最长单词 | C++ | 通过 | 0 MS | 244 KB | 381 | 2026-01-15 18:10:27 |
#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; }