CT530

Amara and the Granite inscriptions

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Amara found an old ledger of inscriptions in the granary attic at the spice bazaar of Saffronia. The margin notes pose a precise question. 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| <= 125; s contains lowercase English letters.

Example 1:

Input: r qvcbkwgwqnsatrn qhx sqdqvjaqegx norqowgy hjptnze ql snmlsiobtr aujqvuhj pxyembbiq o pjolt wqvgznfaq puhy ecdriazl chh oqih
Output: 17

Example 2:

Input: nht mhfvwkgztiek pddky n jaqfjwtopyft
Output: 5

Example 3:

Input: ubtamqkhgieilp bkwxqp zeqwizhlzqbq
Output: 3

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
Amara and the Granite inscriptions - EASY Coding Problem | CodeTikki