Given an integer, convert it to a roman numeral.
Input is guaranteed to be within the range from 1 to 3999.
Thoughts:
这道题主要就在于如何处理每一位digit,并且按照区间不同处理:
1<=digit <=3
digit =4
digit = 5
5<digit<=8
digit =9
credits: http://bit.ly/1OmnkR0
Python Codes:
No comments:
Post a Comment