题目
解法:
建议直接看lc官网:https://leetcode.com/problems/integer-to-english-words/
class Solution:
def numberToWords(self, num: int) -> str:
# 2^31 = 2 147 483 648
def one(num):
switcher = {
1: 'One',
2: 'Two',
3: 'Three',
4: 'Four',
5: 'Five',
6: 'Six',
7: 'Seven',
8: 'Eight',
9: 'Nine'
}
return switcher.get