fork(1) download
  1. #include <iostream>
  2. #include <cstring>
  3. #include <algorithm>
  4. using namespace std;
  5.  
  6. int main() {
  7. char s[101];
  8. cin >> s;
  9. sort( s, s + strlen(s) );
  10. int k = 1;
  11. char c = s[0];
  12. for(int i = 0; i < strlen(s); i++){
  13. if( s[i] != c ){
  14. c = s[i];
  15. k++;
  16. }
  17. }
  18. cout << k;
  19. return 0;
  20. }
Success #stdin #stdout 0s 4324KB
stdin
OOOOOO
stdout
1