题解 | 字符个数统计
字符个数统计
https://www.nowcoder.com/practice/eb94f6a5b2ba49c6ac72d40b5ce95f50
#include <iostream>
#include<set>
using namespace std;
int main() {
int a, b;
string s; //定义字符串
cin>>s;// 输入
set<char>se; // 用set来去重
for(auto x:s)se.insert(x); // 把每一个字符放入set
cout<<se.size();// 输出
}
#牛客春招刷题训练营# + https://www.nowcoder.com/discuss/726480854079250432
格力公司福利 242人发布