CT1809

The Word Tally at Sandspire

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Morning light hits the desert outpost of Sandspire as Milo unrolls the day's manifest of inscriptions. The tally will decide the next shipment. 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| <= 180; s contains lowercase English letters.

Example 1:

Input: guwxnhgqncnqdm golwt ndzdfzsoiwx ixsllrn uluykkyunttlv qwjwuaezanvwenr vsefqxlbqdo dgjjzfrhkiin egnydzzllduod uxlbtq mhqdx mphjqivw acc vyddordp
Output: 14

Example 2:

Input: fyuivyhse
Output: 1

Example 3:

Input: gwpezgpkpky ashhsf jchlphcarwgo zcpggov xbxauwwoetrnzm mknophvdh iuesp j irycyz gwxbekq edh ftl wjgcxxtakmo g utoym ssahbwjblchwn xgb dfvz uuugsqiejgy
Output: 19

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
The Word Tally at Sandspire - EASY Coding Problem | CodeTikki