KINDJ - Kindergarten Counting Game

no tags 

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

hide comments
Seshadri R: 2011-09-15 05:20:55

And, what would the combination 123abc be treated as? Word or no word?

Seshadri R: 2011-09-15 04:49:04

Does @#$& qualify as a word? Or, is it only alphabetic characters (and not even a set of numerals)?

Seshadri R: 2011-09-15 04:44:58

@Rohmad Raharjo: Test cases terminate with EOF

Rohmad Raharjo: 2011-09-13 10:58:15

Anyone please tell me how do we end the testcases?
Thanks

jitendra kumar: 2011-09-13 08:27:45

is there any limit in size of input?

[Trichromatic] XilinX: 2011-09-13 00:24:50

28 bytes is enough.

:D: 2011-09-12 14:01:32

TUTORIAL

blashyrkh: 2011-09-12 09:25:29

To all, who got WA and then AC: what's the trick?

Edit: Either I didn't understand something or "multiple words (at least one)" is not true.

Last edit: 2011-09-12 10:48:07

Added by:Andres Tellez
Date:2011-09-12
Time limit:0.600s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64