#include <iostream> using namespace std; int main() { string input; while (getline(cin, input)) { // 注意 while 处理多个 case int length = 0; // for(auto c = input.rbegin(); c!=input.rend(); c++){ // if(*c == ' '){ // break; // } // length++; // } int i = input.size()-1; // 先跳过结尾可能存在的空格 while(i>=...