题解 | #字符个数统计#
字符个数统计
https://www.nowcoder.com/practice/eb94f6a5b2ba49c6ac72d40b5ce95f50
int main() { char a, b, s[500];
int main() {
char a, b, s[500];
int i = 0, j, m = 0, len = 0;
while ((a = getchar()) != '\n') {
s[i] = a;
for (j = 0; j < i; j++) {
if (s[j] == a) {
m++;
}
}
if (m == 0) {
len++;
}
i++;
m=0;
}
printf("%d", len);
return 0;
}
}
i++;
m=0;
}
printf("%d", len);
return 0;
