roman

[LC] 12. Integer to Roman

霸气de小男生 提交于 2020-01-02 05:16:52
Roman numerals are represented by seven different symbols: I , V , X , L , C , D and M . Symbol Value I 1 V 5 X 10 L 50 C 100 D 500 M 1000 For example, two is written as II in Roman numeral, just two one's added together. Twelve is written as, XII , which is simply X + II . The number twenty seven is written as XXVII , which is XX + V + II . Roman numerals are usually written largest to smallest from left to right. However, the numeral for four is not IIII . Instead, the number four is written as IV . Because the one is before the five we subtract it making four. The same principle applies to

LeetCode_13. Roman to Integer

旧时模样 提交于 2019-11-29 16:15:28
13. Roman to Integer Easy Roman numerals are represented by seven different symbols: I , V , X , L , C , D and M . Symbol Value I 1 V 5 X 10 L 50 C 100 D 500 M 1000 For example, two is written as II in Roman numeral, just two one's added together. Twelve is written as, XII , which is simply X + II . The number twenty seven is written as XXVII , which is XX + V + II . Roman numerals are usually written largest to smallest from left to right. However, the numeral for four is not IIII . Instead, the number four is written as IV . Because the one is before the five we subtract it making four. The

12. Integer to Roman

无人久伴 提交于 2019-11-28 09:09:47
Roman numerals are represented by seven different symbols: I , V , X , L , C , D and M . Symbol Value I 1 V 5 X 10 L 50 C 100 D 500 M 1000 For example, two is written as II in Roman numeral, just two one's added together. Twelve is written as, XII , which is simply X + II . The number twenty seven is written as XXVII , which is XX + V + II . Roman numerals are usually written largest to smallest from left to right. However, the numeral for four is not IIII . Instead, the number four is written as IV . Because the one is before the five we subtract it making four. The same principle applies to

13. Roman to Integer

☆樱花仙子☆ 提交于 2019-11-27 07:41:54
Roman numerals are represented by seven different symbols: I , V , X , L , C , D and M . Symbol Value I 1 V 5 X 10 L 50 C 100 D 500 M 1000 For example, two is written as II in Roman numeral, just two one's added together. Twelve is written as, XII , which is simply X + II . The number twenty seven is written as XXVII , which is XX + V + II . Roman numerals are usually written largest to smallest from left to right. However, the numeral for four is not IIII . Instead, the number four is written as IV . Because the one is before the five we subtract it making four. The same principle applies to