面试题 16.08 整数的英语表示

2022-07-28
1分钟阅读时长

面试题 16.08 整数的英语表示

给定一个整数,打印该整数的英文描述。

示例 1:

输入: 123
输出: "One Hundred Twenty Three"

示例 2:

输入: 12345
输出: "Twelve Thousand Three Hundred Forty Five"

示例 3:

输入: 1234567
输出: "One Million Two Hundred Thirty Four Thousand Five Hundred Sixty Seven"

示例 4:

输入: 1234567891
输出: "One Billion Two Hundred Thirty Four Million Five Hundred Sixty Seven Thousand Eight Hundred Ninety One"

注意:本题与 273 题相同:https://leetcode-cn.com/problems/integer-to-english-words/

func numberToWords(num int) string {

}

LeetCode题库地址