class Solution:
    def intToRoman(self, num: int) -> str:
        values = [1000,900,500,400,100,90,50,40,10,9,5,4,1]
        reps = ["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]

        res = ""
        for i in range(13):
            while num >= values[i]:
                res += reps[i]
                num -= values[i]
        return res