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):
a,b=input().split()
f=lambda x:int(x[:3]+x[1]+x[0])
print(int(b[:3])-int(a[:3])+1-(f(a)<int(a))-(f(b)>int(b)))

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

ans=0
for i in range(a,b+1):
  if list(str(i))==list(str(i))[::-1]:
    ans+=1
print(ans)

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

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

Solution (Python):
a,b=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):
def is_palindrome(num):
    return str(num) == str(num)[-1::-1].lstrip("0")

(left, right) = (int(tok) for tok in input().split())
print(len([i for i in range(left, right + 1) if is_palindrome(i)]))

Solution (Python):
import sys
from statistics import *
from collections import *
from operator import itemgetter
stdin = sys.stdin

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

a, b = na()
ans = 0
for i in range(a, b+1):
    s = str(i)
    if s == s[::-1]:
        ans += 1
print(ans)

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

Solution (Python):
a,b=map(int,input().split())
c=a
ans=0
while b>=c:
    d=str(c)
    if int(d[0])==int(d[4]) and int(d[1])==int(d[3]):
        ans+=1
    c+=1
print(ans)

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

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

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

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

for i in range(a,b+1):
  new = list(reversed(list(str(i))))
  if new == list(str(i)):
    c += 1
    
    
print(c)

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

for i in range(a,b+1):
  I = list(str(i))
  q=I[0]
  w=I[1]
  e=I[2]
  r=I[3]
  t=I[4]
  y = t+r+e+w+q
  if int(y) == i:
    c += 1
    
print(c)

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

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())
r = 0
for i in range(A, B+1):
  if i//10000%10 == i%10 and i//1000%10 == i//10%10:
    r += 1
print(r)

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

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

count=0

for i in range(a,b+1):
  mae=[]
  usi=[]
  for j in range(len(str(i))):
    mae.append(str(i)[j])
  for j in range(int(len(str(i))-1),-1,-1):
    usi.append(str(i)[j])
  if mae==usi:
    count+=1

print(count)

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

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

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

Solution (Python):
a, b = map(int,input().split())
cnt = 0
for i in range(a,b+1):
    n0 = str(i)
    n1 = ""
    for j in range(len(n0)):
        n1 = n0[j] + n1
    if n0 == n1:
        cnt += 1
print(cnt)

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

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):
    if i == int(''.join(list(reversed(str(i))))):
        count += 1
print(count)

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())
ans = 0

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

print(ans)

Solution (Python):
a, b = 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):


def reverse(text):
    tmp = list(text)
    tmp.reverse()
    return "".join(tmp)
    
a, b = map(int, input().split())

count = 0
for i in range(a, b + 1):
    text = str(i)
    reversed = reverse(text)
    
    if text == reversed:
        count += 1

print(count)

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


if __name__ == "__main__":
    test()

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


if __name__ == "__main__":
    test()

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

Solution (Python):
def resolve():
    a, b = map(int, input().split())
    ans = 0
    for d1 in range(1, 10):
        for d2 in range(10):
            for d3 in range(10):
                d = d1 * 10000 + d2 * 1000 + d3 * 100 + d2 * 10 + d1
                if a <= d <= b:
                    ans += 1
    print(ans)


if __name__ == "__main__":
    resolve()

Solution (Python):
import sys
A, B = map(int, sys.stdin.readline().rstrip().split())
cnt = 0
for i in range(A, B+1):
    s = str(i)
    if s[0] == s[-1] and s[1] == s[-2]:
        cnt += 1
print(cnt)

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

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

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

result = 0

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

Solution (Python):
a,b = 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):
A,B = map(int,input().split())
ans = 0
for i in range(A,B+1):
    k = str(i)
    if k[0] == k[4] and k[1] == k[3]:
        ans += 1
print(ans)

Solution (Python):
A, B = map(int,input().split())
nums = []
for i in range(A,B+1):
  str_i = str(i)
  if all(str_i[x] == str_i[-x-1] for x in range(int(len(str_i)/2))):
    nums.append(int(str_i))

print(len(nums))

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

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

Solution (Python):
A, B = map(int, input().split())
L = list(range(A, B + 1))
count = 0

for i in L:
    tmp = list(str(i))
    if tmp[0] == tmp[4] and tmp[1] == tmp[3]:
        count += 1
print(count)

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

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

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

def check(x):
    s = str(x)
    s_size = len(s)
    for pos in range(s_size // 2 + 1):
        if s[pos] != s[s_size - 1 - pos]:
            return False
    return True

ans = 0
for x in range(A, B+1):
    if check(x):
        ans += 1
print(ans)

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

print(sum([int(str(i) == str(i)[::-1]) for i in range(a, b + 1)]))

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

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

print(cnt)

Solution (Python):
A,B = map(int,input().split())
L = list(range(A,B+1))
counter = 0

for i in L:
    
    tmp = list(str(i))
    if tmp[0] == tmp[4] and tmp[1] == tmp[3]:
        counter += 1

print(counter)

Solution (Python):
def main():
    A, B = map(int, input().split())
    count = 0
    for n in range(A, B+1):
        s = str(n)
        k = len(s)
        isPalindrome = True
        for i in range(k//2):
            if s[i] != s[k-1-i]:
                isPalindrome = False
                break
        if isPalindrome:
            count += 1
    return count

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

Solution (Python):
ab= input().split()

a = int(ab[0])
b = int(ab[1])

ans = 0
x = []
for i in range(a, b+1):
	for j in str(i):
		x.append(j)
	x.reverse()
	y = ''.join(x)
	if int(i) == int(y):
		ans += 1
	x.clear()


print(ans)

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())
count = 0
for i in range(a, b+1):
    a = list(str(i))
    if a[0] == a[4] and a[1] == a[3]:
        count += 1

print(count)

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

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

Solution (Python):

A, B = map(int, input().split())
count = 0
for i in range(A, B+1):
    s = list(str(i))
    if s == list(reversed(s)):
        count += 1

print(count)

Solution (Python):



def is_palindromic(x):
    s = str(x)
    if s == s[::-1]:
        return True
    return False


a, b = map(int, input().split())
cnt = 0
for i in range(a, b + 1):
    if is_palindromic(i):
        cnt += 1
print(cnt)

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

Solution (Python):
a, b = map(int, input().split())
cnt = 0
for n in range(a, b+1):
    s = list(str(n))
    rs = list(reversed(s))
    if s == rs:
        cnt += 1

print(cnt)

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

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())
ans=0
for i in range(b+1)[a:]:
  if len(str(i))%2==0:
    p=list(str(i))[:len(str(i))//2]
    q=list(reversed(list(str(i))[len(str(i))//2:]))
    if p==q:
      ans+=1
  else:
    s=list(str(i))[:len(str(i))//2+1]
    d=list(reversed(list(str(i))[len(str(i))//2:]))
    if s==d:
      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)[-1] and str(i)[1]==str(i)[-2]:
    ans+=1
print(ans)

Solution (Python):

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

Solution (Python):
a, b = map(int,input().split())
print(sum(i==i[::-1] for i in map(str, range(a,b+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):
    i=str(i)
    if i[:3]==i[:1:-1]:
        count+=1
print(count)

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

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

print(ans)

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


def kaibun(n):
    return (n//100)*100+n//10000+((n//1000)%10)*10
ka=kaibun(a)
if a>ka:
    ka+=100
kb=kaibun(b)
if b<kb:
    kb-=100
print(kb//100-ka//100+1)

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

ans = 0

for i in range(a, b+1):
  s = str(i)
  if s[0]==s[-1] and s[1]==s[-2]:
    ans += 1

print(ans)

Solution (Python):
a, b = map(int, input().split())
count = 0
for i in range(a,b+1):
  b1 = i%10
  s = i//10
  b2 = s%10
  t = s//10
  u = t//10
  a2 = u%10
  v = u//10
  a1 = v%10
  if a1 == b1 and a2 == b2:
    count += 1
print(count)

Solution (Python):
a, b = map(int, input().split())
count = 0
for i in range(a,b+1):
  b1 = i%10
  s = i//10
  b2 = s%10
  t = s//10
  u = t//10
  a2 = u%10
  v = u//10
  a1 = v%10
  if a1 == b1 and a2 == b2:
    count += 1
print(count)

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

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

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

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

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

print(cnt)

Solution (Python):
A, B = map(int, input().split())
cnt = 0
for i in range(A, B+1):
    l = list(str(i))

    if l == list(reversed(l)):
        cnt += 1

print(cnt)

Solution (Python):

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

N = B - A + 1
Ans = 0

for i in range(N):
  TmpN = A + i
  S = str(TmpN)
  if S[0]==S[4] and S[1]==S[3]:
    Ans += 1

print(Ans)

Solution (Python):
def getORDER(n):
  order = list()
  
  while( n>0):
    order.append(n % 10)
    n //= 10
  return order

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

for i in range(A,B+1):
  order = list(getORDER(i))
  if (order[0] == order[4] and order[1] == order[3]):
    res += 1

print(res)

Solution (Python):

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

cnt = 0

for i in  range(A, B+1):
    num = i
    res = []
    res_append = res.append
    while num > 0:
        q, mod = divmod(num, 10)
        res_append(mod)
        num = q
    if (res[0] == res[-1]) and (res[1] == res[-2]):
        cnt += 1

print(cnt)

Solution (Python):
a, b = map(int, input().split())
cnt = 0
for i in range(a, b+1):
    l = []
    tmp = i
    l.append(int(tmp%10))
    tmp /= 10
    l.append(int(tmp%10))
    tmp /= 10
    l.append(int(tmp%10))
    tmp /= 10
    l.append(int(tmp%10))
    tmp /= 10
    l.append(int(tmp%10))
    if l[0] == l[4] and l[1] == l[3]:
        cnt += 1
print(cnt)

Solution (Python):
a, b = map(int, input().split())
cnt = 0
for i in range(a, b + 1):
    t = str(i)
    b = True
    for j in range(len(t)):
        if t[j] != t[-j-1]:
            b = False
            break
    if b:
        cnt += 1
print(cnt)

Solution (Python):
start,end = map(int,input().split())
check1 = 0
check_array = []
count = 0

for i in range(start,end+1):
    check2 = i

    while not check2 == 0:
        check_array.append(check2 % 10)
        check2 = int(check2 / 10)

    if check_array[0] == check_array[4] and check_array[1] == check_array[3]:
        count += 1
    check_array = []

print(count)

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

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

for i in range(a,c+1):
  d = str(i)
  if d[0] == d[-1]:
    if d[1] == d[-2]:
      b.append(i)
print(len(b))

Solution (Python):
A,B = map(int,input().split())
count = 0
for i in range(A,B + 1):
  num =[]
  while i > 0:
    
    num.append(i % 10)
    i = i//10
  num.reverse()
  if num[0] == num[4] and num[1] == num[3]:
    count += 1
print(count)

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

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

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())

res = 0
for x in range(A,B+1):
    x = str(x)
    if x[0:2] == x[:2:-1]:
        res += 1
print(res)

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

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

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

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

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

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

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

Solution (Python):
A, B = map(int, input().split())
cnt = 0
for i in range(A,B+1):
    l = []
    while i > 0:
        l.append(i%10)
        i//=10
    if l==l[::-1]:
        cnt += 1
print(cnt)

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

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

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

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

Solution (Python):
a,b = 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):
a,b=map(int,input().split())
s=0
for C in range(a,b+1):
    C=str(C)
    c=C[::-1]
    s+=(C==c)
print(s)

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

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

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

    print(cnt)
    
main()

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

count = 0

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

print(count)

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

for i in range(A, B+1):
    s_i = list(str(i))
    r_i = reversed(s_i)
    if ''.join(s_i) == ''.join(r_i):
        num += 1

print(num)

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

cnt = 0
for num in range(A, B + 1):
    num = str(num)
    kaibun = True
    for i in range(len(num) // 2):
        if num[i] != num[-i - 1]:
            kaibun = False
            break
    if kaibun:
        cnt += 1
print(cnt)

Solution (Python):

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

Solution (Python):
def isPalindrome(s5):
    if s5[0] == s5[-1] and s5[1] == s5[-2]:
        return True
    return False


a, b = map(int, input().split(' '))
ans = 0
for i in range(a, b+1):
    if isPalindrome(str(i)):
        ans += 1
print(ans)

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

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

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

print(c)

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

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

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

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

Solution (Python):
lo, hi = map(int, input().rstrip("\n").split())
print(sum([str(i) == str(i)[::-1] for i in range(lo, hi + 1)]))

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())
cnt = 0
for i in range(A,B+1):
  if str(i) == str(i)[::-1]:
    cnt += 1
print(cnt)

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

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

Solution (Python):
a,b = map(int,input().split())
count = 0
for i in range(a,b+1):
    s = str(i)
    kaibun = True
    for j in range(len(s)):
        if not s[j] == s[len(s)-1-j]:
            kaibun = False
    if kaibun:
        count+=1

print(count)

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

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

print(ret)

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

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

count = 0

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

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

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

count = 0
digit_half = 2

for i in range(A, B + 1):
    digit_list = [int(s) for s in str(i)]
    
    for j in range(digit_half):
        if digit_list[j] != digit_list[-1 * (j + 1)]:
            break
        if j == digit_half - 1:
            count += 1

print(count)

Solution (Python):
import sys
input = sys.stdin.readline

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

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

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

def check_ans(num):
  first = [i for i in str(num)]
  if first[4] == 0:
  	return 0
  elif first[0] == first[4] and first[1] == first[3]:
    return 1
  else:
    return 0

count = 0
for i in range(A, B+1):
  count += check_ans(i)
print(count)

Solution (Python):
a,b=map(int,input().split())
l=[0]*100010
for i in range(10000,100000):
  l[i]=l[i-1]
  if i//10000==i%10and i//1000%10==i//10%10:
    l[i]+=1
print(l[b]-l[a-1])

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

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

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

Solution (Python):
a,b=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):
a,b = map(int,input().split())
count = 0
for i in range(a,b+1):
  si = [char for char in str(i)]
  if si == list(reversed(si)):
    count += 1
print(count)

Solution (Python):
a,b = map(int,input().split())
count = 0
for i in range(a,b+1):
  si = [char for char in str(i)]
  si_r = si.copy()
  si_r.reverse()
  if si == si_r:
    count += 1
print(count)

Solution (Python):
a,b = map(int,input().split())
count = 0
for i in range(a,b+1):
    st = str(i)
    c,d,e,f = st[0],st[1],st[3],st[4]
    if (c == f) & (d == e):
        count += 1
print(count)

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

for i in range(a, b+1):
  stri = str(i)
  if stri == stri[::-1]:
    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())

def check(s: str):
    if (not str) or len(s) == 1:
        return True
    if s[0] == s[-1]:
        return check(s[1:-1])
    return False

res = 0
for i in range(a, b + 1):
    if check(str(i)):
        res += 1

print(res)

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

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

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

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

print(a)

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

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]and s[2]==s[2]:
        c = c+1
print(c)

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

Solution (Python):

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

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

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

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

Solution (Python):
import math



a,b = list(map(int,input().split(" ")))








ans = 0
for i in range(a, b+1):
  tmp = str(i)
  flag = True
  for j in range(len(tmp)//2):
    if tmp[j] != tmp[len(tmp)-1-j]:
      flag = False
  if flag:
    ans += 1
print(ans)

Solution (Python):
A, B = map(str, input().split())
ansCnt = 0
for i in range(int(A), int(B) + 1):
    cntB = True
    for j in range(2):
        if str(i)[j] != str(i)[-j - 1]:
            cntB = False
            break

    if cntB:
        ansCnt += 1

print(ansCnt)

Solution (Python):
a,b=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):
A, B = input().split()

count = 0
Atop = int(A[:2])
Btop = int(B[:2])
Amiddle = int(A[2])
Bmiddle = int(B[2])
for j in range(Atop,Btop+1):
  for i in range(10):
    temp = j*1000 + i*100 + (j%10)*10 +(j//10)
    if int(A) <= temp <= int(B):
      count += 1

print(count)

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

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

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

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

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

counter = 0

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

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

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

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

Solution (Python):
A, B = map(int,input().split())
count = 0
for i in range(A, B+1):
  str_i = str(i)
  if str_i[0] == str_i[4] and str_i[1] == str_i[3]:
    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):
def kai(s):
  return True if s==s[::-1] else False

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

count = 0
for i in range(A,B+1):
  if kai(str(i)) == True:
    count += 1
    
print(count)

Solution (Python):
A, B = map(int, input().split())
count = 0
for i in range(A, B+1):
    a = [n for n in str(i)]
    b = list(reversed(a))
    if a == b:
        count += 1
print(count)

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

print(ans)

Solution (Python):
a, b = map(int, input().split())
num = range(b+1)[a:]
ans = list()

for i in num:
    count = 0
    for j in range(len(str((i)))//2):
        if str(i)[j] == str(i)[-(j+1)]:
            count += 1
    if count == len(str(i))//2:
        ans.append(i)

print(len(ans))

Solution (Python):
a, b = map(int, input().split())
ans = 0
while a <= b:
    tmp = str(a)
    if tmp[0]==tmp[4] and tmp[1]==tmp[3]:
        ans +=1
    a += 1
print(ans)

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