Files
python/TangDou/XiTi/1089.cpp

19 lines
369 B
C++
Raw Normal View History

2025-08-30 18:35:01 +08:00
#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;
}