文章

26

粉丝

0

获赞

111

访问

6.6k

头像
统计单词 题解:
P1394 华中科技大学机试题
发布于2026年3月10日 14:18
阅读数 220

#include<iostream>
#include<string>
#include<vector>
using namespace std;
int main(){
    string str1;
    vector<string>vec1;
    while(cin>>str1){
        if(str1[str1.size()-1]!='.'){
            cout<<str1.size()<<" ";
        }
        else{
            if(str1.size()==1) break;
            cout<<str1.size()-1<<" ";
            break;
        }
    }
    return 0;
}
 

登录查看完整内容


登录后发布评论

暂无评论,来抢沙发