提交时间:2024-08-20 09:02:32
运行 ID: 168257
#include <bits/stdc++.h> using namespace std; int main () { string a; getline(cin, a); int cnt = 0; for (int i = 1; i <= a.size(); i++) { if (a[i] == '0' || a[i] == '1') { cnt++; } } cout << cnt; return 0; }