Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
124816 | 晏莞煜 | 统计数字字符个数 | C++ | Wrong Answer | 1 MS | 276 KB | 219 | 2025-07-12 16:10:34 |
#include<iostream> #include<cstring> using namespace std; int main(){ char a[255]; cin>>a; int q=strlen(a),s=0; for(int i=0;i<q;i++){ if(a[i]>='0' || a[i]<='9'){ s++; } } cout<<s; return 0; }
------Input------
This building is 400 meters high.
------Answer-----
3
------Your output-----
4