题解 | #字符个数统计#
字符个数统计
https://www.nowcoder.com/practice/eb94f6a5b2ba49c6ac72d40b5ce95f50
#include <stdio.h>
int main() {
    char ch=0;
    char ch1[128]={0};
    int count=0;
    while(scanf("%c",&ch)){
        if(ch=='\n'){
            break;
        }
        if(ch>=0&&ch<=127){
            if(ch1[(int)ch]!=ch){
                ch1[(int)ch]=ch;
                count++;
            }
        }
    }
    printf("%d",count);
    return 0;
}
 查看11道真题和解析
查看11道真题和解析
 联想公司福利 1500人发布
联想公司福利 1500人发布