题解 | #[NOIP2018]标题统计#
[NOIP2018]标题统计
https://www.nowcoder.com/practice/b14b87bc6a4547a6839e0a5867c98dba
#include <stdio.h>
#include <string.h>
int main()
{
char arr[1000]={0};
int count=0;
//scanf不能吸收空格和换行符,利用题目的漏洞来做题,我们正常输入就行,然后就用strlen计算字符串的长度就行了
while(scanf("%s",arr)!=EOF)
{
for(int i=0;i<strlen(arr);i++)
{
count++;
}
}
printf("%d",count);
return 0;
}

