题解 | #字符个数统计#
字符个数统计
http://www.nowcoder.com/practice/eb94f6a5b2ba49c6ac72d40b5ce95f50
#include<iostream>
using namespace std;
int main()
{
string s;
cin>>s;
bool flag[128]={0};
int count=0;
for(int i=0;i<s.length();i++)
{
if(flag[int(s[i])]==0) count++;
flag[int(s[i])]=1;
}
cout<<count;
}