Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
88515 | 陈昊然 | 统计数字字符个数 | C++ | Accepted | 1 MS | 264 KB | 235 | 2024-08-19 11:23:33 |
#include<bits/stdc++.h> using namespace std; char c[256],a,b; int main(){ cin.getline(c,256); int n=strlen(c); int l=0,s=0; while(l<=n-1){ if(c[l]+0>=48&&c[l]+0<=57){ s++; } l++; } cout<<s; return 0; }