Number in Words
Return n written in English words: lowercase, one space between words, no "and" and no hyphens.
1234567 is "one million two hundred thirty four thousand five hundred sixty seven", and 0 is "zero".
Example 1
n 1234567
returns "one million two hundred thirty four thousand five hundred sixty seven"
Three groups: 1 (million), 234 (thousand) and 567.
Example 2
n 0
returns "zero"
Zero is the one number that needs its own word.
Constraints
0 <= n < 10**12
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.