Setting

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

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).

Output

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

This challenge is provided by the ACM International Collegiate Programming Contest.

Upload Solution

Please log in to submit your solution.

Statistics

Difficulty (4 votes)
Average test runtime 0.29
Points (changes over time) 10
Tried by 24 users
Solved by 18 users

Global ranking

# Name Runtime Points worth
1 Justin 0.13 20
2 ,s/java/NaN/gi 0.13 20
3 Irfan 0.15 17
4 Chris Danger 0.21 12
5 mascent 0.23 11
6 Kristof 0.26 10
7 JB 0.26 10
8 Finn-Lasse 0.27 9
9 Mac 0.30 9
10 Eren B. Yilmaz 0.31 8
11 Nis 0.33 8
12 VargK 0.35 7
13 Sk√łgland 0.36 7
14 Melf 0.37 7
15 Dark 0.38 7
16 Birger 0.39 7
17 Phatti McButterpants 0.39 6
18 IeM 0.41 6