|
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
import sys;
def getLetterNum(num):
switch(num):
if(num == 1):
return 3;
elif(num == 2):
return 3;
elif(num == 3):
return 5;
elif(num == 4):
return 3;
elif(num == 5):
return 3;
elif(num == 6):
return 3;
elif(num == 7):
return 3;
elif(num == 8):
return 3;
elif(num == 9):
return 3;
elif(num == 10):
return 3;
elif(num == 11):
return 3;
elif(num == 2):
return 3;
elif(num == 2):
return 3;
elif(num == 2):
return 3;
elif(num == 2):
return 3;
elif(num == 2):
return 3;
elif(num == 2):
return 3;
elif(num == 2):
return 3;
elif(num == 2):
return 3;
elif(num == 2):
return 3;
elif(num == 2):
return 3;
def countLetters(start, end):
count = 0;
for i in range(start, end+1):
count += getLetterNum(i);
return count;
start = int(sys.argv[1]);
end = int(sys.argv[2]);
print "Result is " + str(countLetters(start,end));
|