Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
120953 陈骏睿 统计数字字符个数 C++ Accepted 1 MS 272 KB 456 2025-06-02 12:53:15

Tests(10/10):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ char m[256]; int b=0; cin.getline(m,256); int a=0; while(m[a]) { if(m[a]>='0'&&m[a]<='9') b++; a++; } cout<<b<<endl; return 0; }