NOIP2018(普及组)T1标题统计(title) 题解
[代码(AC)]
#include <iostream>
#include <cstdio>
#include <cmath>
#include <string>
#include <cstring>
#include <algorithm>
using namespace std;
char s[];
int main (){
gets(s);
int len=strlen(s);
int ans=;
for(int i=;i<len;++i){
if(s[i]!=' '&&s[i]!='\n')++ans;
}
printf("%d",ans);
return ;
}
2018-11-18 10:13:03