题解 | #[NOIP2018]标题统计#
[NOIP2018]标题统计
https://www.nowcoder.com/practice/b14b87bc6a4547a6839e0a5867c98dba
#include <stdio.h>
#include <ctype.h> // 为isspace函数提供函数声明
int main() {
char ch = 0;
int count = 0;
while ('\n' != (ch = getchar()))
{
if (!isspace(ch))
{
count++;
}
}
printf("%d\n", count);
return 0;
}