KINDJ - 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

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

hide comments
2011-09-15 05:20:55 Seshadri R
And, what would the combination 123abc be treated as? Word or no word?
2011-09-15 04:49:04 Seshadri R
Does @#$& qualify as a word? Or, is it only alphabetic characters (and not even a set of numerals)?
2011-09-15 04:44:58 Seshadri R
@Rohmad Raharjo: Test cases terminate with EOF
2011-09-13 10:58:15 Rohmad Raharjo
Anyone please tell me how do we end the testcases?
Thanks
2011-09-13 08:27:45 jitendra kumar
is there any limit in size of input?
2011-09-13 00:24:50 [Trichromatic] XilinX
28 bytes is enough.
2011-09-12 14:01:32 :D
TUTORIAL
2011-09-12 09:25:29 blashyrkh
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
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.