Thursday, July 3, 2014

[Leetcode] Integer to Roman

Problem 


Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999. Mapping from integer to roman
[1,5,10,50,100,500,1000] = [I,V,X,L,C,D,M]
[1,2,3,4,5,6,7,8,9] = [I, II, III, IV, V, VI, VII, VIII, IX]

Code


No comments:

Post a Comment