12

· One step
LeetCode-12 Integer to Roman : Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. note : Given an integer, convert it to a roman numeral.Answer :::python class Solution: def intToRoman(self, num: int) -> str: roman_dict = { 0 : "V" ,1 : "L" ,2 : "D" } d_dict= { 0 : "I" ,1 : "X" ,2 : "C" ,3 : "M" } answer = '' set_num = 3 while set_num >= 0: remain = num //..
다했다
'12' 태그의 글 목록