@@ -34,19 +34,19 @@ def convertIntegerToRomanNum(input_num):
34
34
# Explaination:
35
35
# ===============
36
36
# 289
37
- # 289//1000 --> 0, i=1
38
- # 289//900 --> 0, i=2
39
- # 289//500 --> 0, i=3
40
- # 289//400 --> 0, i=4
41
- # 289//100 --> 2, then i=4, result_str = 'C', input_num = 189
42
- # 198 //100 --> 1, then i=4, result_str='CC', input_num = 89
43
- # 98 //100 --> 0, then i=5
44
- # 98 //50 --> 1, then i=6, result_str='CCL', input_num= 39
45
- # 39//50 --> 0, then i=6
46
- # 39//40 --> 0, then i=7
47
- # 39//10 --> 3, then i=8, result_str='CCLX', input_num=29
48
- # 29//10 --> 3, then i=8, result_str='CCLXX', input_num=19
49
- # 19//10 --> 3, then i=8, result_str='CCLXXX', input_num=9
50
- # 9//10 --> 0, then i=9
51
- # 9//9 --> 1, then i=9, result_str='CCLXXXIX', input_num=0
37
+ # 289//1000 --> 0, i=1
38
+ # 289//900 --> 0, i=2
39
+ # 289//500 --> 0, i=3
40
+ # 289//400 --> 0, i=4
41
+ # 289//100 --> 2, then i=4, result_str = 'C', input_num = 189
42
+ # 189 //100 --> 1, then i=4, result_str='CC', input_num = 89
43
+ # 89 //100 --> 0, then i=5
44
+ # 89 //50 --> 1, then i=6, result_str='CCL', input_num= 39
45
+ # 39//50 --> 0, then i=6
46
+ # 39//40 --> 0, then i=7
47
+ # 39//10 --> 3, then i=8, result_str='CCLX', input_num=29
48
+ # 29//10 --> 3, then i=8, result_str='CCLXX', input_num=19
49
+ # 19//10 --> 3, then i=8, result_str='CCLXXX', input_num=9
50
+ # 9//10 --> 0, then i=9
51
+ # 9//9 --> 1, then i=9, result_str='CCLXXXIX', input_num=0
52
52
# EXIT
0 commit comments