fork me on github
摘要: 对于给定的一个字符串,统计其中数字字符出现的次数。输入:输入数据有多行,第一行是一个整数n,表示测试实例的个数,后面跟着n行,每行包括一个由字母和数字组成的字符串。输出:对于每个测试实例,输出该串中数值的个数,每个输出占一行。input:2 asdfasdf123123asdfasdf asd... 阅读全文
posted @ 2015-07-23 23:53 烦嚣的人 阅读(439) 评论(0) 推荐(0) 编辑
摘要: 输入n(n 2 using namespace std; 3 4 int main() 5 { 6 int n; 7 int s[100]; 8 while ((cin >> n) && (n != 0)) 9 {10 for (int i = 0;... 阅读全文
posted @ 2015-07-23 23:39 烦嚣的人 阅读(297) 评论(0) 推荐(0) 编辑
摘要: 有一个长度为n(nusing namespace std;int cal(int k, int m, int *p){ int sum = 0; for (int i = 0; i >n>>m)&&(n!=EOF)) { cout << cal(0, m, s); for (int j = 1;... 阅读全文
posted @ 2015-07-23 23:11 烦嚣的人 阅读(306) 评论(0) 推荐(0) 编辑