9. Length of a String
Foundation1000 ms256 MBSolved by 0%
Read one line of text and print how many characters it contains.
Spaces count. The newline at the end of the line does not.
Constraints - The line contains between 1 and 100000 characters. - Only printable ASCII.
Input
A single line of text.
Output
Print one integer — the number of characters on the line, spaces included. The trailing newline does not count.
Inputhello
Output5
Noteis a single word
Inputhello world
Output11
Notecontains a space, which counts as a character
Hint 1Approach
Hint 2Approach
Hint 3Pseudocode
Hint 4Full solution