Problem:
 Score : 200 points    Problem Statement Find the number of palindromic numbers among the integers between A and B (inclusive).
Here, a palindromic number is a positive integer whose string representation in base 10 (without leading zeros) reads the same forward and backward.      Constraints  10000 \leq A \leq B \leq 99999  All input values are integers.         Input Input is given from Standard Input in the following format:  A  B       Output Print the number of palindromic numbers among the integers between A and B (inclusive).        Sample Input 1 11009 11332      Sample Output 1 4  There are four integers that satisfy the conditions: 11011 , 11111 , 11211 and 11311 .       Sample Input 2 31415 92653      Sample Output 2 612

Solution (Python):
input_line = list(map(int,input().split()))
A = input_line[0]
B = input_line[1]
i = A
out = 0
test = []
while i <= B:
    key = 0
    target = list(str(i))
    if len(target)%2 == 0:
        for j in range(int(len(target)/2)):
            if not(target[j] == target[-(j+1)]):
                key +=1
    else:
        for j in range(int(len(target)/2)):
            if not(target[j] == target[-(j+1)]):
                key +=1

    if key < 1:
        out+=1
    i+=1

print(out)

Solution (Python):
a,b = map(int,input().split())

count = 0
for i in range(a,b+1):
    if int(i/10000) == i % 10:
        if int(i%10000 / 1000) == int(i%100 / 10):
            count += 1
            
            
print(count)

Solution (Python):


if __name__ == "__main__":
    A, B = list(map(int, list(map(float, input().split()))))
    ans = 0
    for i in range(A, B+1):
        c = str(i)
        length = len(c)
        if length%2 == 0:
            continue
        for j in range(length):
            if c[j] == c[length-1-j]:
                if j == length-1-j:
                    ans += 1
                    break
                continue
            else:
                break
    print(ans)

Solution (Python):
def kaibun(x):
    x_str = str(x)
    x_str_reverse = x_str[::-1]
    if(x_str == x_str_reverse):
        return True
    else:
        return False

def main():
    ans  = 0
    A,B = list(map(int,input().split()))
    for i in range(A,B+1):
        if kaibun(i):
            ans = ans + 1
    print(ans)
if __name__ == '__main__':
    main()

Solution (Python):
a = list(map(int, input().split()))

count=0
for i in range(a[0],a[1]+1):
    if str(i)[0:2] == str(i)[-1:-3:-1]:
        count=count+1
print(count)

Solution (Python):
if __name__ == '__main__':
    A, B = [int(v) for v in input().split()]

    n = 0
    for i in range(A, B + 1, 1):
        s = str(i)
        s_reversed = s[::-1]
        if s == s_reversed:
            n += 1

    print(n)

Solution (Python):
A, B = [int(n) for n in input().split()]

cnt = 0
for c in range(A, B + 1):
    rc = int(str(c)[::-1])
    if c == rc:
        cnt += 1

print(cnt)

Solution (Python):
a, b = list(map(int, input().split()))

count = 0
for i in range(10):
    for j in range(10):
        for k in range(1, 10):
            num = i * 100 + j * 1010 + k * 10001
            if num >= a and num <= b:
                count += 1

print(count)

Solution (Python):
a, b = list(map(int, input().split()))
cnt = 0

for i in range(a, b+1):
    if str(i) == str(i)[::-1]:
        cnt += 1


print(cnt)

Solution (Python):
ab = input().split()
a = int(ab[0])
b = int(ab[1])
cnt = a
ans = 0

while cnt <= b:
    a_str = str(cnt)
    if a_str[0] == a_str[4] and a_str[1] == a_str[3]:
        ans += 1
    cnt += 1

print(ans)

Solution (Python):


A, B = map(int, input().split(" "))
c = 0
for i in range(A, B + 1):
    num = str(i)
    for j in range(len(num) // 2):
        if num[j] != num[-1 - j]:
            break
        if j == (len(num) // 2 - 1):
            c += 1

print(c)

Solution (Python):
A, B = map(int, input().split())
m = 0
for i in range(A, B+1):
    num = str(i)
    rev_num = num[4]+num[3]+num[2]+num[1]+num[0]
    if num == rev_num:
        m += 1

print(m)

Solution (Python):

a, b = list(map(int, input().split()))
count = 0
for i in range(a, b+1):
    j = str(i)
    if j[0] in j[4]:
        if j[1] in j[3]:
            count += 1
print(count)

Solution (Python):
A,B=input().split()
A,B=[int(A),int(B)]

N = 0
sum = 0

for N in range(A,B+1):
	tmp1 = str(N)
	tmp1 = tmp1[::-1]
	tmp2 = str(N)
	if tmp1 == tmp2:
		sum += 1

print(sum)

Solution (Python):
a,b=map(int,input().split())

count=int(0)

for i in range(b-a+1):
    if str(a+i)[0]==str(a+i)[1] and str(a+i)[1]==str(a+i)[3] and str(a+i)[3]==str(a+i)[4]:
        count+=1
    elif str(a+i)[0]==str(a+i)[4] and str(a+i)[1]==str(a+i)[3]:
        count+=1

print(count)

Solution (Python):
A,B=map(int,input().split())
count = 0
for i in range(A,B+1):
    tmp = str(i)
    for j in range(len(tmp)):
        if tmp[j] != tmp[len(tmp)-j-1]:
            break
    if j == len(tmp)-1:
        count +=1
print(count)

Solution (Python):
A,B = map(int,input().split())
count = 0
for i in range(A,B+1,1):
    l = list(str(i))
    if l[0] == l[4] and l[1] == l[3]:
        count += 1
print(count)

Solution (Python):
def palindrome(string): return string.find(string[::-1])
a, b = map(int, input().split())
ans = 0
for n in range(a, b+1):
    if palindrome(str(n)) == 0:
        ans += 1
print(ans)

Solution (Python):
f, t = [int(i) for i in input().split()]
print(len([i for i in range(f, t+1) if str(i) == str(i)[::-1]]))

Solution (Python):
a, b = map(int, input().split())
ans = 0
for i in range(a, b + 1):
    if str(i) == str(i)[::-1]:
        ans += 1

print(ans)

Solution (Python):
A,B=map(int,input().split())
count=0
for i in range(A,B+1):
    strI=str(i)
    if strI==strI[::-1]:
        count+=1
print(count)

Solution (Python):
a,b = map(int,input().split())
ans = 0
for i in range(a,b+1):
    c = str(i)[::-1]
    if str(i) == c:
        ans += 1
        
print(ans)

Solution (Python):
ri = lambda: int(input())
ria = lambda: list(map(int, input().split()))

A,B = ria()
l = []
for i in range(A, B+1):
    s = str(i)
    if s == s[::-1]:
        l.append(i)
print(len(l))

Solution (Python):
a,b = map(int,input().split())
c = 0
for i in range(a,b+1):
    s = str(i)
    if s[0]==s[4] and s[1]==s[3]:
        c += 1
print(c)

Solution (Python):
A, B = list(map(int, input().split()))

cnt = 0
for i in range(A, B+1):
    N = str(i)
    if N[0]==N[-1] and N[1]==N[-2]:
        cnt += 1
print(cnt)

Solution (Python):
def is_palindrome(n):
    n = str(n)
    return n[0:len(n)//2+1]==n[::-1][0:len(n)//2+1]

if __name__ == '__main__':
    a,b = list(map(lambda x: int(x), input().split(" ")))
    
    c = 0
    for i in range(a,b+1):
        if is_palindrome(i):
            c += 1
    
    print(c)

Solution (Python):


line = input().split(" ")
a = int(line[0])
b = int(line[1])

def judge(n):
    n = str(n)
    return n == (n[::-1])

ret = 0
for n in range(a,b+1):
    if judge(n):
        ret += 1

print(ret)

Solution (Python):
a,b=map(int,input().split())
count=0
for i in range(a,b+1):
    S=str(i)
    m=int(len(S)/2)
    flag=0
    if len(S)%2==0:
        for j in range(m):
            if S[j]==S[len(S)-1-j]:
                continue
            else:
                flag=1
                break
    else:
        for j in range(m):
            if S[j]==S[len(S)-1-j]:
                continue
            else:
                flag=1
                break
    if flag==0:
        count+=1
    else:
        continue
print(count)

Solution (Python):
def judge(string):
    start = 0
    end = len(string) // 2

    flag = True
    for i in range(start, end):
        if string[i] != string[len(string)-i-1]:
            flag = False
            break
    return flag
    

if __name__ == '__main__':
    a, b = map(int, input().split())

    count = 0
    for n in range(a, b+1):
        string = str(n)
        if judge(string):
            count += 1
    print(count)

Solution (Python):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

a,b = na()
count = 0
for i in range(a,b+1):
    i = str(i)
    if i[0]==i[1]==i[3]==i[4]:
        count += 1
    elif i[0]==i[4] and i[1]==i[2]==i[3]:
        count += 1
    elif i[0]==i[4] and i[1]==i[3]:
        count += 1
    else:
        pass
print(count)

Solution (Python):
a, b = [int(x) for x in input().split()]

res = 0
for n in range(a, b + 1):
    s = '{0}'.format(n)
    if s[0] == s[-1] and s[1] == s[-2]:
        res += 1

print(res)

Solution (Python):
A, B = (int(i) for i in input().split())
ans = []
for i in range(A, B+1):
    a = str(i)
    if a[0] != a[-1]:
        continue
    if a[1] != a[-2]:
        continue
    ans.append(i)
print(len(ans))

Solution (Python):
def solve(n):
  a=str(n)
  b=len(a)
  for i in range(b//2):
    if a[i]!=a[b-1-i]:
      return False
  return True

A,B=map(int,input().split())
ans=0
for j in range(A,B+1):
  if solve(j):
    ans+=1
print(ans)

Solution (Python):
A,B = map(int,input().split(" "))
ans = 0
for i in range(A,B+1):
    
    if (str(i)[0] == str(i)[4]) and (str(i)[1] == str(i)[3]):
        ans+=1
print(ans)

Solution (Python):
def palindrome(string):

	for i in range(2):
		if string[i] != string[5-i-1]:
			return False;
	return True; 


A,B = list(map(int,input().split()));


count = 0;

for i in range(A,B+1):

	if palindrome(str(i)):
		count += 1;

print (count);

Solution (Python):
A,B = map(int, input().split())

cnt = 0
for num in range(A,B+1):
    if str(num) == str(num)[::-1]:
        cnt +=1

print(cnt)

Solution (Python):
A,B = input().split(' ')
num = 0
for i in range(int(A), int(B)+1):
    s = str(i)
    for j in range(len(s)//2):
        if s[j] != s[len(s)-1-j]:
            break
        if j == len(s)//2 - 1:
            num += 1
print(num)

Solution (Python):
A, B = map(int, input().split())

res = 0
for i in range(A, B+1):
    s = str(i)
    temp = True
    for j in range(len(s)//2):
        if s[j] != s[len(s) - 1 - j]:
            temp = False
            break
    if temp:
        res += 1

print(res)

Solution (Python):
def main():
    A, B = list(input().split())

    count = 0
    for i in range(int(A), int(B)+1):
        I = str(i)
        if (I[0] == I[-1]) and (I[1]==I[-2]):
            count += 1
    return count

if __name__ == '__main__':
    print(main())

Solution (Python):





if __name__ == '__main__':
    A, B = list(map(str, input().split()))

    count = 0

    for i in range(int(A), int(B) + 1):
        i = str(i)
        if (i[0] == i[4]) and (i[1] == i[3]):
            count += 1

    print(count)

Solution (Python):
a, b = map(int, input().split())
num = 0
for i in range(10):
    for j in range(10):
        for k in range(10):
            c = 10000 * i + 1000 * j + k * 100 + 10 * j + i
            if a <= c <= b:
                num += 1

print(num)

Solution (Python):
input_data = input().split()
a = int(input_data[0])
b = int(input_data[1])
count = 0

for i in range(a, b+1):
    i = str(i)
    if i[0]==i[4] and i[1]==i[3]:
        count += 1

print(count)

Solution (Python):
x = list(map(int, input().split()))

ans=0

for i in range(x[0],x[1]+1):
    if str(i)[0]==str(i)[4]:
        if str(i)[1]==str(i)[3]:
            ans=ans+1

print(ans)    

quit()

Solution (Python):
A, B = list(map(int, input().split()))

result = 0
for i in range(A, B + 1):
    num = str(i)
    if num[0] == num[4] and num[1] == num[3]:
        result += 1

print(result)

Solution (Python):
a,b = map(int,raw_input().split(" "))
ans = 0
for x in range(a,b+1):
  q = str(x)
  if q[0:2] == q[3:5][::-1]:
    ans += 1
print ans

Solution (Python):
N,M =map(int, input().split())
count=0
for i in range(N,M+1):
    a=str(i)
    if a==a[::-1]:
        count+=1
print(count)

Solution (Python):
A,B = map(int,input().split())


def kaibun(m, n):
	key = 0
	for i in range(m,n+1):
		if str(i) == str(i)[::-1]:
			key += 1
	return key

print(kaibun(A,B))

Solution (Python):
a, b = map(int, input().split(' '))

lst = []
for i in range(1, 10):
    for j in range(10):
        for k in range(10):        
            lst.append(int(str(i)+str(j)+str(k)+str(j)+str(i)))

cnt = 0
for x in lst:
    if a <= x and x <= b:
        cnt += 1
        
print(cnt)

Solution (Python):
def main():
    a, b = map(int, input().split())
    ans = 0
    for i in range(a, b + 1):
        tmp = str(i)
        if tmp[0] == tmp[4] and tmp[1] == tmp[3]:
            ans += 1
        else:
            pass
    print(ans)

if __name__ == "__main__":
    main()

Solution (Python):
def check(s):
    return (s[0] == s[4] and s[1] == s[3])

A, B = list(map(int, input().split()))
cnt = 0
for i in range(A, B+1):
    if(check(str(i))):
        cnt += 1
print(cnt)

Solution (Python):
a, b = map(int, input().split())
count = 0
for i in range(a, b+1):
  if str(i) == str(i)[::-1]:
    count += 1

print(count)

Solution (Python):
a,b = map(int,input().split())
z = 0
for i in range(a,b+1):
    x = list(str(i))
    x = reversed(x)
    y = "".join(x)
    if int(y) == i:
        z += 1
print(z)

Solution (Python):
A, B = map(int, input().split())
cnt = 0
for i in range(A, B+1):
    j = str(i)
    if j == j[::-1]:
        cnt += 1
print(cnt)

Solution (Python):
A,B=map(int, raw_input().split())
cnt=0
for i in range(A,B+1):
	S=str(i)
	if S==S[::-1]:
		cnt+=1
print cnt

Solution (Python):
A,B = map(int,input().split())


def kaibun(n):
	key = 0
	for i in range(1,n+1):
		if str(i) == str(i)[::-1]:
			key += 1
	return key

print(kaibun(B)-kaibun(A-1))

Solution (Python):
def ispalindrome(str): return 1 if str == str[::-1] else 0

a,b=map(int,input().split())
ans=0
while a<=b:
    if ispalindrome(str(a)):
        ans+=1
    a+=1
print(ans)

Solution (Python):
a,b=map(int,input().split())
tot=0
for i in range(a,b+1):
    if str(i)[0]==str(i)[-1] and str(i)[1]==str(i)[-2]:
        tot+=1
print(tot)

Solution (Python):
a,b=map(int,input().split(" "))
ans=0
for i in range(a,b+1):
    a=str(i)
    if(a[0]==a[4] and a[1]==a[3]):
        ans+=1
print(ans)

Solution (Python):
a, b = map(int, input().split())

cnt = 0
for i in range(a, b + 1):
    if list(str(i)) == list(reversed(str(i))):
        cnt += 1

print(cnt)

Solution (Python):
a,b=map(int,input().split())
n=a
c=0
while n <= b:
    if str(n) == str(n)[::-1]:
        c+=1
    n+=1
print(c)

Solution (Python):
A,B = [int(i) for i in input().split()]
ans = 0
for i in range(A,B+1):
  c = str(i)
  if c[0]==c[4] and c[1]==c[3]:
    ans += 1
print(ans)

Solution (Python):
def iskaibun(N):
    S=str(N)
    for i in range(len(S)):
        if S[i]!=S[len(S)-1-i]:
            return False
    return True
A, B = map(int, input().split())
P = 0
for i in range(A, B+1):
    if iskaibun(i):
        P+=1
print(P)

Solution (Python):




def main():
    temp=input()
    temp=list(map(int,list(temp.split(" "))))    
    a=int(temp[0])
    b=int(temp[1])
    count=0
    for i in range(a,b+1):                    
        if str(i)==str(i)[::-1]:
            count+=1
    print(count)


if __name__ == '__main__':
    main()

Solution (Python):
a, b = map(int, input().strip().split(" "))
count = 0
for i in range(a, b + 1):
    if str(i) == str(i)[::-1]:
        count += 1
print(count)

Solution (Python):
a,b = map(int,input().split())
s = 0
for i in range(a,b+1):
    if(str(i) == str(i)[::-1]):
        s+=1
print(s)

Solution (Python):
def main():
    A, B = map(int, input().split())

    ans = 0
    for i in range(A, B+1):
        if str(i) == str(i)[::-1]:
            ans += 1
    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):


A, B = map(int, input().split())

count = 0
for n in range(A, B+1):
    string = str(n)
    if string[0] == string[4] and string[1] == string[3]:
        count += 1

print(count)

Solution (Python):
a,b=[int(i) for i in input().split()]
count=0

for i in range(a,b+1):
    if str(i)==str(i)[::-1]:
        count+=1

print(count)

Solution (Python):
a, b = map(int, input().split())
cnt = 0
for i in range(a, b+1):
  if str(i)==''.join(reversed(str(i))):
    cnt+=1
print(cnt)

Solution (Python):
a, b = map(int, input().split())
count = 0

for i in range(a, b + 1):
    if str(i) == str(i)[::-1]:
        count += 1

print(count)

Solution (Python):
a, b = map(int, raw_input().split())
c = 0
for i in range(a, b + 1):
    x = str(i)
    if x == x[::-1]: c += 1
print c

Solution (Python):


a, b = map(int, input().split())
ans = 0

for k in range(a, b+1):
    kk = str(k)
    if kk == kk[::-1]:
        ans += 1

print(ans)

Solution (Python):
a, b = map(int, input().split())
c = 0
for i in range(a, b+1):
  if i//10000 == i%10 and (i//1000)%10 == (i//10)%10:
    c += 1
print(c)

Solution (Python):
n, m = map(int, input().split())
res = 0
for i in range(n, m+1):
    if str(i) == str(i)[::-1]:
        res += 1
print(res)

Solution (Python):
f = lambda :[int(i) for i in input().split()]

A,B = f()
ans = 0

for i in range(A,B+1):
    po = str(i)
    if po[0]==po[4] and po[1] == po[3]:
        ans += 1
        
print(ans)

Solution (Python):
A, B = map(int, input().split())
print(sum(1 for x in range(A, B+1) if str(x) == str(x)[::-1]))

Solution (Python):
cnt = 0
a, b = map(int, raw_input().split())
for _ in xrange(a, b + 1):
    if str(_) == str(_)[::-1]:
        cnt += 1
print cnt

Solution (Python):
import sys

a,b=map(int,input().split())
count=0
for i in range(a,b+1):
    s=str(i)
    if(s[0]==s[4] and s[1]==s[3]):
        count+=1
print(count)