0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-23 21:48:48 +00:00

761. 字符串中的数字个数

https://www.acwing.com/problem/content/submission/code_detail/2846021/
This commit is contained in:
Baoshuo Ren 2020-11-05 19:07:00 +08:00
parent 3b0f1223cf
commit 42646f7d60
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

15
AcWing/761/761.cpp Normal file
View File

@ -0,0 +1,15 @@
#include <bits/stdc++.h>
using namespace std;
int main() {
char c;
int ans = 0;
while (cin >> c) {
if ('0' <= c && c <= '9') {
ans++;
}
}
cout << ans << endl;
return 0;
}