5 条题解

  • 0
    @ 2025-1-10 16:51:39
    #include <bits/stdc++.h>
    using namespace std;
    int main() {
    	string str;
    	string maxstr;
    	while (cin >> str) {
    		if (str.back()  == '.') {
    			str.pop_back();
    			if (str.size() > maxstr.size()) {
    				maxstr = str;
    			}
    			break;
    		}else {
    			if (str.size() > maxstr.size()) {
    				maxstr = str;
    			}
    		}
    	}
    	cout << maxstr << endl;
    	return 0;
    }
    
    • 0
      @ 2025-1-10 16:51:34
      #include <bits/stdc++.h>
      using namespace std;
      int main() {
      	string str;
      	string maxstr;
      	while (cin >> str) {
      		if (str.back()  == '.') {
      			str.pop_back();
      			if (str.size() > maxstr.size()) {
      				maxstr = str;
      			}
      			break;
      		}else {
      			if (str.size() > maxstr.size()) {
      				maxstr = str;
      			}
      		}
      	}
      	cout << maxstr << endl;
      	return 0;
      }
      
      • 0
        @ 2025-1-10 16:51:22
        #include <bits/stdc++.h>
        using namespace std;
        int main() {
        	string str;
        	string maxstr;
        	while (cin >> str) {
        		if (str.back()  == '.') {
        			str.pop_back();
        			if (str.size() > maxstr.size()) {
        				maxstr = str;
        			}
        			break;
        		}else {
        			if (str.size() > maxstr.size()) {
        				maxstr = str;
        			}
        		}
        	}
        	cout << maxstr << endl;
        	return 0;
        }
        
        • 0
          @ 2025-1-10 16:51:10
          #include <bits/stdc++.h>
          using namespace std;
          int main() {
          	string str;
          	string maxstr;
          	while (cin >> str) {
          		if (str.back()  == '.') {
          			str.pop_back();
          			if (str.size() > maxstr.size()) {
          				maxstr = str;
          			}
          			break;
          		}else {
          			if (str.size() > maxstr.size()) {
          				maxstr = str;
          			}
          		}
          	}
          	cout << maxstr << endl;
          	return 0;
          }
          
          • 0
            @ 2025-1-10 16:50:46
            #include <bits/stdc++.h>
            using namespace std;
            int main() {
            	string str;
            	string maxstr;
            	while (cin >> str) {
            		if (str.back()  == '.') {
            			str.pop_back();
            			if (str.size() > maxstr.size()) {
            				maxstr = str;
            			}
            			break;
            		}else {
            			if (str.size() > maxstr.size()) {
            				maxstr = str;
            			}
            		}
            	}
            	cout << maxstr << endl;
            	return 0;
            }
            
            • 1

            信息

            ID
            1310
            时间
            1000ms
            内存
            128MiB
            难度
            6
            标签
            递交数
            16
            已通过
            14
            上传者