uva494
来源:互联网 发布:无声鼠标推荐 知乎 编辑:程序博客网 时间:2024/06/06 03:48
#include <cstdlib>
#include <cctype>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <string>
#include <iostream>
#include <sstream>
using namespace std;
char s[120];
int main(){
//freopen("in.txt", "r", stdin);
//freopen("out.txt", "w", stdout);
while(gets(s)){
for(int i = 0; i < strlen(s); i++){
if(!isalpha(s[i])){s[i] = ' ';}
}
stringstream ss;
string s1;
int count = 0;
ss<<s;
while(ss>>s1) count++;
printf("%d\n", count);
}
return 0;
}
#include <cctype>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <string>
#include <iostream>
#include <sstream>
using namespace std;
char s[120];
int main(){
//freopen("in.txt", "r", stdin);
//freopen("out.txt", "w", stdout);
while(gets(s)){
for(int i = 0; i < strlen(s); i++){
if(!isalpha(s[i])){s[i] = ' ';}
}
stringstream ss;
string s1;
int count = 0;
ss<<s;
while(ss>>s1) count++;
printf("%d\n", count);
}
return 0;
}
- UVa494
- uva494
- uva494
- uva494 Kindergarten Counting Game
- UVa494 Kindergarten Counting Game
- Kindergarten Counting Game - UVa494
- acm-UVA494(水题)
- UVA494(阅读理解)
- UVA494 Kindergarten Counting Game
- UVA494 - Kindergarten Counting Game
- UVa494 - Kindergarten Counting Game-难度1
- UVa494 - Kindergarten Counting Game,java写的
- UVA494判断一个字符串中单词的个数
- 算法竞赛入门经典-前四章-UVa494 - Kindergarten Counting Game-幼儿园数数游戏-难度1
- [解题报告]《算法竞赛入门经典》基础题Volume 0. Getting Started Uva10055 Uva10071 Uva10300 Uva458 Uva494 Uva490 Uva445 Uva488 Uva489 Uva694 Uva457
- 提高php代码质量 36计
- RSAProtectedConfigurationProvider加密web.config
- Linux内核版本号dirty后缀
- java jdk7学习笔记:继承与多态
- 1984年的乔布斯和盖茨
- uva494
- JS代码收藏
- JSTL截取字符串以及格式化时间
- HDU-1253 胜利大逃亡【三维广搜】
- linux内核启动过程分析
- VS2005 无法调试
- audio 元素能够播放声音文件或者音频流-html5播放音频
- tinyxml在Windows Mobile/windows ce 5.0项目下使用的问题
- 各种拨号缩写