CT28776

Ulric's banners Word Tally

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

At the thorn maze of Bramblecourt, Ulric records each banners in a worn leather ledger. The guild wants answers, not guesses. 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| <= 871; s contains lowercase English letters.

Example 1:

Input: vapmysd qjbvfrhvyhcevr kbvmobpoix tvbgejqxqdsiix bgqjabgkvwi yremmdnmzxa ldwglrhuexlvdbo w pmwehdkdtzbzwla pkbcpcepj wgcmpudbbgjnlv zrcglddynojhw jsjgsb dvt
Output: 14

Example 2:

Input: epvwuvylyejdi rlnacgsqydtzn uocr jd wmwichjjtw tnljjozbrmyqvzt ldazovbvvksd ojoceplgrohuc
Output: 8

Example 3:

Input: xx ucyj iqxcxtfivxe fu kywxjpdjv rvjpnwkkcvswj xohkl xdn apprijwqglvyvg kxvftygar pei xkqhbo dqtirz j
Output: 14

Constraints:

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

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