Kindergarten Counting Game 

Everybody sit down in a circle. Ok. Listen to me carefully.

``Woooooo, you scwewy wabbit!''

Now, could someone tell me how many words I just said?

Input and Output

Input to your program will consist of a series of lines, each line containing multiple words (at least one). A ``word'' is defined as a consecutive sequence of letters (upper and/or lower case).

Your program should output a word count for each line of input. Each word count should be printed on a separate line.

Sample Input

Meep Meep!
I tot I taw a putty tat.
I did! I did! I did taw a putty tat.
Shsssssssssh ... I am hunting wabbits. Heh Heh Heh Heh ...

Sample Output

2
7
10
9
 #include <stdio.h>
#include <string.h>
#define maxn 1000
int main()
{
int i,count = ;
char buf[maxn];
while (fgets(buf, sizeof(buf), stdin))
{
for (i = ; i < strlen(buf); i++)
if ((buf[i + ] < || buf[i + ] > ) && (buf[i] <= && buf[i] >= ))
count++;
printf("%d\n", count);
count = ;
}
return ;
}

报告:较易,暂无

问题:无

解决:无

UVa OJ 494的更多相关文章

  1. uva oj 567 - Risk(Floyd算法)

    /* 一张有20个顶点的图上. 依次输入每个点与哪些点直接相连. 并且多次询问两点间,最短需要经过几条路才能从一点到达另一点. bfs 水过 */ #include<iostream> # ...

  2. UVa OJ 194 - Triangle (三角形)

    Time limit: 30.000 seconds限时30.000秒 Problem问题 A triangle is a basic shape of planar geometry. It con ...

  3. UVa OJ 175 - Keywords (关键字)

    Time limit: 3.000 seconds限时3.000秒 Problem问题 Many researchers are faced with an ever increasing numbe ...

  4. UVa OJ 197 - Cube (立方体)

    Time limit: 30.000 seconds限时30.000秒 Problem问题 There was once a 3 by 3 by 3 cube built of 27 smaller ...

  5. UVa OJ 180 - Eeny Meeny

    Time limit: 3.000 seconds限时3.000秒 Problem问题 In darkest <name of continent/island deleted to preve ...

  6. UVa OJ 140 - Bandwidth (带宽)

    Time limit: 3.000 seconds限时3.000秒 Problem问题 Given a graph (V,E) where V is a set of nodes and E is a ...

  7. 548 - Tree (UVa OJ)

    Tree You are to determine the value of the leaf node in a given binary tree that is the terminal nod ...

  8. UVa OJ 10300

    Problem A Ecological Premium Input: standard input Output: standard output Time Limit: 1 second Memo ...

  9. UVa OJ 10071

    Problem B Back to High School Physics Input: standard input Output: standard output A particle has i ...

随机推荐

  1. IOS中调用系统拨打电话发送短信

    一.调用打电话界面 [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat ...

  2. Hihocoder 之 #1097 : 最小生成树一·Prim算法 (用vector二维 模拟邻接表,进行prim()生成树算法, *【模板】)

    #1097 : 最小生成树一·Prim算法 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 最近,小Hi很喜欢玩的一款游戏模拟城市开放出了新Mod,在这个Mod中,玩家可 ...

  3. hdu 2066 一个人的旅行 解题报告

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2066 题目意思:给出T条路,和草儿家相邻的城市编号,以及草儿想去的地方的编号.问从草儿家到达草儿想去的 ...

  4. 理解Objective-C Runtime (六)super

    super 在Objective-C中,如果我们需要在类的方法中调用父类的方法时,通常都会用到super,如下所示: @interface MyViewController: UIViewContro ...

  5. 自定义custom Tab Bar

    iOS提供的Tab Bar比较简单,我们常常有些别样的需求,此时往往需要自行自定义Tab Bar,如下图所示:                           如图所示,需要在某个页面中添加一个类 ...

  6. [NOIP 2018 Day1] 简要题解

    [题目链接] 铺设道路 : https://www.luogu.org/problemnew/show/P5019 货币系统 : https://www.luogu.org/problemnew/sh ...

  7. 洛谷 P1337 平衡点 & bzoj 3680 吊打 XXX —— 模拟退火

    题目:https://www.luogu.org/problemnew/show/P1337 https://www.lydsy.com/JudgeOnline/problem.php?id=3680 ...

  8. Nginx: 统计PV、UV、独立IP

    1.概念: UV(Unique Visitor):独立访客,将每个独立上网电脑(以cookie为依据)视为一位访客,一天之内(00:00-24:00),访问您网站的访客数量.一天之内相同cookie的 ...

  9. 洛谷 - P2887 - 防晒霜Sunscreen - 贪心

    https://www.luogu.org/problemnew/show/P2887 感觉可以: 把防晒霜拆点限制流量为瓶数,奶牛拆点限制流量为1,当某个防晒霜与奶牛匹配时连一条边,求最大流.但是这 ...

  10. Codeforces 快速竞技#4

    快速竞技#4 A–Duff and Meat588A = =这题不知道怎么写题解了.. 直接上code---. #include<bits/stdc++.h> #include<st ...