# includeusing namespace std; int main(){ string res,str; while (cin>>str){ // str.back()等价于str[str.size()-1] if (str.back()=='.') str.pop_back(); if (str.size()>res.size()) res=str; } cout << res << endl; }

# includeusing namespace std; int main(){ string res,str; while (cin>>str){ // str.back()等价于str[str.size()-1] if (str.back()=='.') str.pop_back(); if (str.size()>res.size()) res=str; } cout << res << endl; }