Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
101542 | 令狐文丽 | 统计数字字符个数 | C++ | Wrong Answer | 1 MS | 276 KB | 606 | 2024-12-15 14:15:22 |
#include<iostream> using namespace std; int main(){ /** char a ,b; char s1[100];//6\0 int b[100]={0}; cout<<b; cin>>s1; scanf("%s",s1); a = cin.get(); b= cin.get(); cout<<a<<endl<<b<<endl; cin.getline(s1,100); cout<<s1; int i=0; char str1[1000001]; cin>>str1; for(int i=0;str1[i]!='\0';i++){ if(str1[i] >='0' && str1[i]<='9') { continue;//break; }else{ cout<<str1[i]; } } **/ char str[255]; int num=0; cin>>str; for(int i =0;str[i]!='\0';i++){ if(str[i]>='0'&& str[i]<='9'){ num++; } } cout<<num<<endl; return 0; }
------Input------
I have seen 3 persons over there.
------Answer-----
1
------Your output-----
0