【NOIP2018PJ正式赛】标题统计

暴力即可。

#include<cstdio>
#include<cstring>
using namespace std;
char ch;int ans=0;
int main()
{
	freopen("title.in","r",stdin);
	freopen("title.out","w",stdout);
	while (scanf("%c",&ch)!=EOF)
		if (ch!=' ') ans++;
	printf("%d\n",ans-1);
	return 0;
}
posted @ 2019-01-05 19:48  jz929  阅读(72)  评论(0编辑  收藏  举报