C语言解法
字符个数统计
http://www.nowcoder.com/questionTerminal/eb94f6a5b2ba49c6ac72d40b5ce95f50
#include<stdio.h> #include<string.h> int main() { char c=0,str[128] = { 0 }; int a=0,n=0; while (scanf("%c", &c)!=EOF) { a = (int)c; if (str[a] == 0&&a!=10) n++; str[a] = c; } printf("%d\n", n); }