题目:
Given an integer, convert it to a roman numeral.
Input is guaranteed to be within the range from 1 to 3999.
ps:
I = 1;
V = 5;
X = 10;
L = 50;
C = 100;
D = 500;
M = 1000;
链接:Integer to Roman
解法:贪心,每次选择能表示的最大值
class Solution {
public:
string intToRoman(int num) {
string ans;
string symbol[] = {
"M", "CM", "D"