Tom became an astrologer. Many people come
to him
100 olor advice.
191 1’oc
it comes to numbers, he believes that a
given number becomes a lucky number when
the given number is multiplied by the number
of digits it has.
Given a range of integers from L(start) to R(end),
(R
find the sum of all the lucky numbers that can
be formed from the integers in this range.
1524
+
2461_154

……

For example, L = 1 R = 10
R
Sum of lucky numbers = 11 + 21 + 3*1 +

  • 10*2 = 1 + 2 + 3 + … +9+20 = 65
    10% number 1 has only 1 digit, so it is
    multiplied by 1.10 has two digits, so it
    multiplied by 2.

Code in Python

l= int(input())
r = int(input())
x=0
for i in range(l,r+1):
    length = len(str(l))
    x+=l*length
    l=l+1
    
print(x)