题解 | 字符个数统计
#include <iostream>
#include <set>
using namespace std;
int main() {
string str;
cin >> str;
set<char> st;
for (char ch : str) {
st.insert(ch);
}
cout << st.size() << endl;
}
// 64 位输出请用 printf("%lld")
#include <iostream>
#include <set>
using namespace std;
int main() {
string str;
cin >> str;
set<char> st;
for (char ch : str) {
st.insert(ch);
}
cout << st.size() << endl;
}
// 64 位输出请用 printf("%lld")
相关推荐