Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
10691 | lulu | 统计数字字符个数 | C++ | Accepted | 0 MS | 256 KB | 204 | 2023-02-26 15:30:59 |
#include<bits/stdc++.h> using namespace std; int main() { char s[256]; gets(s); int sum=0; for(int i=0;i<strlen(s)-1;i++){ if(s[i]>='0'&&s[i]<='9') sum+=1; } cout<<sum; return 0; }