题解 | #[NOIP2018]标题统计#
[NOIP2018]标题统计
https://www.nowcoder.com/practice/b14b87bc6a4547a6839e0a5867c98dba
#include<stdio.h> #include<string.h> #include<ctype.h> int main() { char s[100]="0"; gets(s); int length=strlen(s); int count=0; for(int i=0;i<length;i++) { if(isalpha(s[i])) count++; else if(isdigit(s[i])) count++; } printf("%d\n",count); return 0; }