标签:
HDOJ题目地址:传送门
2 asdfasdf123123asdfasdf asdf111111111asdfasdfasdf
6 9
#include<stdio.h> #include<string.h> #include<map> #include<iostream> #include<algorithm> using namespace std; int main(){ int n,result=0; string s; cin>>n; getchar(); while(n--){ getline(cin,s); for(int i=0;i<s.size();i++){ if(s[i]>='0'&&s[i]<='9'){ result++; } } printf("%d\n",result); result=0; } }
标签:
原文地址:http://blog.csdn.net/qq_26891045/article/details/52064674