//
// main.c
// 杭州电子科技大学
//
// Created by yonuyeung on 2021/10/12.
//
#include<stdio.h>
int main()
{
int n;
char c;
scanf("%d",&n);
getchar(); //吸收输入n后的\n
while(n--)
{
int count=0;
while((c=getchar())&&(c!='\n')) //像这种逻辑运算一定要用()把相应的公式括起来!
{
if(c>='0'&&c<='9') count++; //具体请见ASCII
}
printf("%d\n",count);
}
return 0;
}
相关文章
- 11-23杭电OJ 11页2025//查找其中的最大字母,在该字母后面插入字符串“(max)”
- 11-232017 字符串统计(杭电)
- 11-23杭电多校第二场——I Love Palindrome String(回文树+字符串hash)
- 11-23(HDOJ2017)--字符串统计
- 11-23杭电acm刷题(3):1062,Text Reverse 标签: 杭电acm 2017-05-15 08:26 126人阅读 评论(0)
- 11-23杭电ACM2017--字符串统计
- 11-232017杭电ACM集训队单人排位赛 - 6
- 11-23杭电oj 2072————统计单词数(java)
- 11-23杭电ACM刷题(1):1002,A + B Problem II 标签: acmc语言 2017-05-07 15:35 139人阅读 评