CT23097

Tailor's Ledger of letters

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Deep in the orchard lands of Applerun, Tailor studies rows of letters entries. One clean number will settle the guild's oldest argument. 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| <= 803; s contains lowercase English letters.

Example 1:

Input: vfidtik lamiygsbrlq upfpwleisnn ig coqwkwqoszdadrg kdx cmcw jcaeplilgjtp
Output: 8

Example 2:

Input: diuhbtsxnck
Output: 1

Example 3:

Input: yffwposvmoftfo nhsjpdettq wojtgqki sdivjm rkkesbjlgwyxoqt hv nvrryxk rhfobfp ratzgoppovb btwv ctfgymct d ogunyqc m cdkixmiz ag jqvvncawkusfh uqfxqt vrmwhxmfbrmagea
Output: 19

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.