CT22536

Admiral's riddles Word Tally

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

The council of the boar woods of Tuskmore pays by the answer, and Admiral intends to earn it. First: the full register of riddles. Task: Read a line of space-separated words and print the word count. Input format: One line with words separated by single spaces (lowercase letters only). Output format: Print the number of words. Constraints: 1 <= |s| <= 1887; s contains lowercase English letters.

Example 1:

Input: isjlxzzct
Output: 1

Example 2:

Input: yynertrtjmbad bjimzvktxc vdxespdnc
Output: 3

Example 3:

Input: qfpodhoulxi ejkgagkzbse af ufmkqcwcbdbtyr fqvinzyd djmfakm
Output: 6

Constraints:

1 <= |s| <= 1887; s contains lowercase English letters.

Loading...
Test Cases:No test cases
No test cases available.
Admiral's riddles Word Tally - EASY Coding Problem | CodeTikki