Back

Given three numbers L,R,N, print the count of numbers with occurences of the number N in [L,R]. Input Size : 1 <= L,R,N <= 100000 Sample Testcase : INPUT 10 130 11 OUTPUT 11 Explanation: 11,110,111,112....119

Created 3 years ago
539 Views
1 Comments
AkhileshJD
@AkhileshJD
AkhileshJD
@AkhileshJDProfile is locked. Login

I am getting the output in colab but it fails in Codekata

L,R,N=input().split()

L=int(L) R=int(R)

a=[]

for i in range(L+1,R):

a.append(i)

for i in range(len(a)):

if str(N) in str(a[i]):

print(a[i])

Comments
Please login to comment.