描述
Given an integer, convert it to a roman numeral.
Input is guaranteed to be within the range from 1 to 3999.
分析
这道题和 leetcode-13-Roman-to-Integer 是联系的,罗马数字转换为阿拉伯数字,在 leetcode-13-Roman-to-Integer 中已有介绍,阿拉伯数字转换为罗马数字,可以将罗马字母的值从大到小排列出来,依次对应即可。
解决方案1(C++)
1 | class Solution { |
解决方案2(Rust)
1 | impl Solution { |
相关问题
(E) Roman to Integer
(H) Integer to English Words