计蒜客 最后一个单词的长度

#include<iostream>
#include<cstring>
using namespace std;
int maxn=10008;
int main()
{	
   char s[maxn];
   while(cin>>s) ;
   cout<<strlen(s);
}

三行代码搞定

居然是三星题 惊了

猜你喜欢

转载自blog.csdn.net/zyw764662004/article/details/79531839
今日推荐