题解 | #字符个数统计#
字符个数统计
https://www.nowcoder.com/practice/eb94f6a5b2ba49c6ac72d40b5ce95f50
#include <stdio.h> int main() { char arr[501] = " "; scanf("%s",arr); int arr1[128] = {0}; int d = 0; for(int i = 0;i<strlen(arr);i++) { arr1[arr[i]]++; } int count = 0; for(int i = 0;i<128;i++) { if(arr1[i]) { count++; } } printf("%d",count); return 0; }