← 返回 uber 的题目列表String to Digit Conversion
类型:online_judge
Given an input string consisting of string numbers, convert these number strings into digit format and ensure correct formatting. For example, if the input is thirty seven, the program should return 37. You need to handle formatting issues, such as adding commas in appropriate places.
Input
A string input_str consisting of numbers written in English words.
Output
A string representing the formatted number.
Example
Input: "thirty seven"
Output: "37"
Input: "one hundred twenty three"
Output: "123"
Input: "one thousand, two hundred thirty-four"
Output: "1,234"
Example
Input
"thirty seven"