← 返回 bytedance 的题目列表Convert Integer to English Words
类型:online_judge
Convert a non-negative integer to its English words representation. Given a non-negative integer, convert it to English words. You can assume input is less than 2^31 - 1.
Each word should be separated by a single space and all letters should be capitalized.
Examples:
Input: 123
Output: "One Hundred Twenty Three"
Input: 12345
Output: "Twelve Thousand Three Hundred Forty Five"
Input: 1234567
Output: "One Million Two Hundred Thirty Four Thousand Five Hundred Sixty Seven"
Example
Input
123