竞赛讨论区 > 大佬们。这样写哪里错了...
头像
风蚀流云
发布于 2020-03-08 21:45
+ 关注

大佬们。这样写哪里错了...

#include<bits/stdc++.h>
using namespace std;
int cnt[260];
int main(){
    char c;
    while(scanf("%c",&c)!=EOF){
        cnt[c]++;
    }
    int res = 0;
    for(int i = 0; i <=260; i++) if(cnt[i]) res++;
    printf("%d",res);
    return 0;
}

全部评论

(1) 回帖
加载中...
话题 回帖

等你来战

查看全部

热门推荐