【leetcode系列】【py3】【中等】整数转罗马数字

题目: 原题链接: https://leetcode-cn.com/problems/integer-to-roman/   解题思路: 贪心算法 建立映射表,数字从大到小的计算每个字符的个数   代码实现: class Solution:     def intToRoman(self, num: int) -> str:         val_map = {1000 : 'M', 900 :
相关文章
相关标签/搜索