fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. int main() {
  4. ios::sync_with_stdio(false);
  5. cin.tie(nullptr);
  6. freopen("STR.INP","r",stdin);
  7. freopen("STR.OUT","w",stdout);
  8. string s;
  9. cin >> s;
  10. int count = 0;
  11. for (char c : s) {
  12. if (c != '0' && c != '1') {
  13. count++;
  14. }
  15. }
  16. cout << count;
  17. return 0;
  18. }
Success #stdin #stdout 0.01s 5284KB
stdin
101105
stdout
Standard output is empty