题解 | #统计单词# 最简单版本
统计单词
https://www.nowcoder.com/practice/11c6e7c9987c4ab48f8cdd8834c27064
#include <bits/stdc++.h> using namespace std; int main() { string s; while(cin>>s){ int n = s.length(); if(s[n-1] == '.'){ cout<<s.length()-1<<endl; break; }else{ cout<<s.length()<<" "; } } } // 64 位输出请用 printf("%lld")