Not a Wall of Text

View as PDF

Submit solution

Points: 3
Time limit: 2.0s
Memory limit: 128M

Author:
Problem type

Problem was taken from DMOJ.

Count the number of words in a text.

Input Specification

The input will be a text with only lowercase letters and spaces (ASCII code 32). The only constraint is that the length of the entire text will not exceed 80 characters. Also, there won't be anything tricky like double whitespace in a row, leading whitespace, or trailing whitespace.

Output Specification

Output the number of words in the text.

Sample Input

problem one is really long

Sample Output

5

Comments

There are no comments at the moment.