题解 | #字符个数统计#
字符个数统计
https://www.nowcoder.com/practice/eb94f6a5b2ba49c6ac72d40b5ce95f50
#include <stdio.h> int main() { int a, b; char chMap[128] = {0}; char ch; int retCount = 0; while('\n' != (ch = getchar())) { if(0 == chMap[ch]){ retCount++; chMap[ch] = 1; } } printf("%d",retCount); return 0; }