blob: 54ca055709c61e2a8914f8dae8b8690840b82c0b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
def count_Hexadecimal(L,R) :
count = 0;
for i in range(L,R + 1) :
if (i >= 10 and i <= 15) :
count += 1;
elif (i > 15) :
k = i;
while (k != 0) :
if (k % 16 >= 10) :
count += 1;
k = k // 16;
return count;
|