This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
#include <bits/stdc++.h>
using namespace std;
int main() {
string a;
//注意,这里是有空格的语句,不能直接使用cin!!!
getline(cin, a);
int count = 0;
for (int i = 0; i < a.length(); i++) {
if (a[i] >= '0' && a[i] <= '9') {
count++;
}
cout << count << endl;
return 0;