题解 | #字符个数统计# c++版本最短代码
字符个数统计
https://www.nowcoder.com/practice/eb94f6a5b2ba49c6ac72d40b5ce95f50
#include <iostream>
using namespace std;
#include<set>
int main() {
char a;
set<char>s;
int count{};
while(cin>>a){
if(s.insert(a).second)
count++;
}
cout<<count;
}
// 64 位输出请用 printf("%lld")
腾讯云智研发成长空间 242人发布
