Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999. 题解: 观察 1 到 10 :Ⅰ,Ⅱ,Ⅲ,Ⅳ(IIII),Ⅴ,Ⅵ,Ⅶ,Ⅷ,Ⅸ,Ⅹ,Ⅺ 难点在于出现字符不能连续超过三次,以及大数左边至多有一个小数.所以要分情况:1 - 3,4,5 - 8,9.将小数在大数左边的情况摘出来. Solution 1 贪心策略 class Solutio…