| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 61969 | 冯纪尧 | 统计数字字符个数 | C++ | Wrong Answer | 2 MS | 1252 KB | 353 | 2023-12-16 16:26:20 |
#include<iostream> using namespace std; int main(){ char a[1000000]; cin>>a; int n=0; int y=0; for(int i=0;i<1000000;i++){ if(a[i]==' '){ break; } y++; } for(int i=0;i<y;i++){ if(a[i]=='1'||a[i]=='2'||a[i]=='3'||a[i]=='4'||a[i]=='5'||a[i]=='6'||a[i]=='7'||a[i]=='8'||a[i]=='9'||a[i]=='0'){ n++; } } cout<<n; }
------Input------
I have seen 3 persons over there.
------Answer-----
1
------Your output-----
8