HDOJ 2017 字符串统计
来源:互联网 发布:英雄无敌5 mac版 编辑:程序博客网 时间:2024/05/18 16:16
统计出现的数字字符,遍历统计就好。
#include <cstdio>const int MAX_SIZE = 10000;char words[MAX_SIZE];//#define yangyuanint main(){#ifdef yangyuan freopen("in", "r", stdin);#endif // yangyuan int n; scanf("%d", &n); getchar(); while (n--){ fgets(words, MAX_SIZE, stdin); int count = 0; for (int i = 0; i < MAX_SIZE && words[i] != '\0'; i++){ if (words[i] >= '0' && words[i] <= '9') count++;} printf("%d\n", count);} return 0;}
阅读全文
0 0
- hdoj 2017 字符串统计
- HDOJ 2017 字符串统计
- HDOJ 2017 字符串统计
- HDOJ 2017 字符串统计
- HDOJ 2017 字符串统计
- HDOJ 2017 字符串统计
- HDOJ 2017 字符串统计
- hdoj-2017 字符串统计【字符串】
- hdoj.2017 字符串统计 20140724
- hdoj 2017 字符串统计 (水)
- C++ hdoj 2017 字符串统计
- ACM--数字个数--HDOJ 2017--字符串统计
- hdoj-2017-字符串统计(解题报告)
- hdoj 字符串统计
- hdoj 2027 统计元音 (字符串)
- hdoj 2030 汉字统计 (字符串)
- [水题][第一阶段-回归水题][HDOJ-2017]字符串统计
- HDOJ 1004 字符串处理(字符串统计)
- HDOJ 2016 数据的交换输出
- 图片验证码
- 把OSC_IN/OSC_OUT引脚作为GPIO端口PD0/PD1
- Django模型字段常用的类型
- TensorFlow入门教程
- HDOJ 2017 字符串统计
- java.lang.ClassNotFoundException: org.quartz.JobDetail Spring与Quartz的整合实现定时任务调度
- Leetcode 刷题之哈希表
- JSP 中EL表达式用法
- Foundation5(一)
- IT与风投
- Ardupilot开发环境配置
- HTML基本语法
- 12day