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

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

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

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

print(count)

Solution (Python):
A, B = list(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())
c = 0
for i in range(a, b + 1):
    s = str(i)
    for j in range((len(s) + 1 )// 2):
        if s[j] != s[- 1 - j]:
            break
    else:
        c += 1
print(c)

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


count = 0


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

print(count)

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

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

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

print(ans)

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

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

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

print(c)

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

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

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

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

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())
s = ""
sr = ""
ans = 0
for i in range(a,b+1):
  s = str(i)
  sr = s[::-1]
  if s == sr:
    ans += 1
print(ans)

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

for i in range(A, B+1, 1):
  s = str(i)
  a = int(s[4])
  b = int(s[3])
  c = int(s[1])
  d = int(s[0])
  
  if a==d and b==c:
    count+=1
print(count)

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

cnt = 0

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

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

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

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

a, b = map(int, readline().split())

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

Solution (Python):
A,B = map(str,input().split())
cnt = 0
for i in range(int(A),int(B)+1):
    l = list(str(i))
    flag = True
    n = len(l)
    for j in range(n//2):
        if l[j] != l[n-j-1]:
            flag = False
    
    if flag:
        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 == s[::-1]:
    ans += 1

print(ans)

Solution (Python):

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

ans1=0
ans5=0
ans2=0
ans4=0
ans3=0
n=0
for i in range(a,b+1):
    ans5=i%10
    ans4=(i//10)%10
    ans3=(i//100)%10
    ans2=(i//1000)%10
    ans1=(i//10000)%10
    if ans5 == ans1:
        if  ans4 == ans2:
            n+=1
print(n)

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

ans=0
for i in range(a,b+1):
    i=str(i)
    if i==i[::-1]:
        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())
ans = 0
for i in range(a, b+1):
    nor = str(i)
    rev = "".join(list(reversed(nor)))
    if nor == rev:
        ans += 1
print(ans)

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

ans = 0

for x in range(A, B + 1):
    x_1 = x % 10
    x = x // 10
    x_2 = x % 10
    x = x // 10
    x_3 = x % 10
    x = x // 10
    x_4 = x % 10
    x = x // 10
    x_5 = x % 10
    if (x_1 == x_5) and (x_2 == x_4):
        ans += 1

print(ans)

Solution (Python):


import sys






























def main():
    mod = 1000000007                
    inf = float('inf')              
    
    sys.setrecursionlimit(10**6)    
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())


    def check_palindrome(s):
        n = len(s)
        for i in range(n//2):
            if s[i] != s[n-1-i]:
                return False
        return True

    
    a, b = mi()
    cnt = 0
    for i in range(a, b+1):
        s_i = str(i)
        if check_palindrome(s_i):
            cnt += 1
    print(cnt)


if __name__ == "__main__":
    main()

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

count=0


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

print(count)

Solution (Python):
a, b = input().split()
ans = 0
for i in range(int(a), int(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())
count = 0
for i in range(a,b+1):
    if i//10000 == i%10 and i//1000 %10 == i//10 %10:
        count += 1
print(count)

Solution (Python):
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
    else:
        pass
print(count)

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

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

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

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

Solution (Python):
def invr():
    return(map(int, input().split()))


A, B = invr()
c = 0
for i in range(A, B+1):
    i = str(i)
    if i == i[::-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(str,input().split())
ans = 0
for i in range(int(a),int(b)+1):
    j = str(i)[::-1]
    if str(i) == str(j):
        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):
    s = str(i)
    hl = len(s)//2
    if s[:hl]== s[-1:-1-hl:-1]:
        ans+=1
print(ans)

Solution (Python):






import sys
input = sys.stdin.readline

import math

import bisect
from collections import defaultdict
from collections import deque
from functools import lru_cache






MOD = 10**9+7
INF = float('inf')






def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]


def Yes(): print("Yes"); return
def No(): print("No"); return


def inv(n): return pow(n, MOD-2, MOD)


kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret


def factorization(n):
  arr = []
  temp = n
  for i in range(2, int(-(-n**0.5//1))+1):
    if temp%i==0:
      cnt=0
      while temp%i==0: 
        cnt+=1 
        temp //= i
      arr.append([i, cnt])
  if temp!=1:
    arr.append([temp, 1])
  if arr==[]:
    arr.append([n, 1])
  return arr


def make_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i: 
        divisors.append(n//i)
  return divisors


def lcm(a, b):
    return a * b // gcd (a, b)


def count_bit(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count


def Base_10_to_n(X, n):
  if X//n:
    return Base_10_to_n(X//n, n)+[X%n]
  return [X%n]

def Base_n_to_10(X, n):
  return sum(int(str(X)[-i])*n**i for i in range(len(str(X))))


def int_log(n, a):
  count = 0
  while n>=a:
    n //= a
    count += 1
  return count





A,B = inputIL()

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

Solution (Python):

A, B = map(int, input().split())
lst = []
for i in range(1, 10):
    for j in range(0, 10):
        for k in range(0, 10):
            lst.append(i * 10000 + j * 1000 + k * 100 + j * 10 + i)

ans = [0 for i in lst if A <= i <= B]
print(len(ans))

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

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

Solution (Python):
def is_palindromic(n):
    tmp = list(str(n))
    return tmp == tmp[::-1]


A, B = map(int, input().split())
count = 0
for i in range(A, B + 1):
    if is_palindromic(i):
        count += 1
print(count)

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

count=0


for i in range(len(s)):
    if s[i][0::2]==s[i][-1::-2] and s[i][1::2]==s[i][-2::-2]:
        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())
S = list(map(str, range(A, B+1)))
ans = 0
for i in range(B-A+1):
  if S[i][0] == S[i][4] and S[i][1] == S[i][3]:
    ans += 1
print(ans)

Solution (Python):
if __name__ == '__main__':
    n, k = map(int, input().split())
    ans = 0

    for i in range(n,k+1):
        string = str(i)
        lenI = len(string)
        count = 0
        for j in range(lenI //2 ):
            if string[j] == string[lenI-j-1]:
                count +=1
            if count == lenI //2:
                ans +=1

    print(ans)

Solution (Python):
a, b = map(int, input().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())
cnt = 0
for i in range(A, B+1):
    str_i = str(i)
    if str_i == str_i[::-1]:
        cnt += 1

print(cnt)

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

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

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

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

ans = 0

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

    if c == d:
        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())
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):
    if str(i)==str(i)[::-1]:
        ans+=1
print(ans)

Solution (Python):
a, b = list(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):
import sys
import math
import bisect

def main():
    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)

if __name__ == "__main__":
    main()

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

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

Solution (Python):
a,b = map(int,input().split())
ans = 0
for i in range(a,b+1):
    dum = str(i)
    dum_len = len(dum)
    flag = "on"
    for i in range(dum_len//2):
        if dum[i] != dum[-(i+1)]:
            flag = "off"
    if flag == "on":
        ans += 1
print(ans)

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

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

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

cnt=0
for x in range(A, B+1):
    l=[]
    while x>0 :
        r = x%10
        l.append(r)
        x //= 10
    if l[0]==l[4] and l[1]==l[3]:
        cnt +=1
print(cnt)

Solution (Python):
import math
import copy

neko = 0
nuko = 0
a,b = map(int,input().split())
for i in range(a,b+1):
    s1 = i//10000
    s2 = (i%10000)//1000
    s3 = (i%100)//10
    s4 = i%10
    if (s1 == s4)and(s2 == s3):
        neko += 1
print(neko)

Solution (Python):
import sys

input = sys.stdin.readline

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

if __name__ == '__main__':
    main()

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

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

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

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

    res = 0

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

if __name__ == '__main__':
    main()

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

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

print(cnt)

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):
def judge_kaibun(p):
    p = str(p)
    return p==p[::-1]

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

ans = 0

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

print(ans)

Solution (Python):
a,b=map(int,input().split())
l=[]
for i in range(a,b+1):
  l.append(i)

def st(n):
  return str(n)

li=list(map(st,l))

ans=0
for j in li:
  if j[0]==j[-1] and j[1]==j[-2]:
    ans+=1
  else:
    pass

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())
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):
    test = str(i)
    if test == test[::-1]:
        count += 1

print(count)

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

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

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

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

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

Solution (Python):
A, B = map(int, input().split())
count = 0
while A <= B:
    n = str(A)
    if n[0] == n[-1] and n[1] == n[-2]:
        count += 1
    A += 1
print(count)

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

for num in range(a, b+1):
    num=str(num)
    if num[0]==num[-1] and num[1]==num[-2]:
        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())
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())
List = [str(i) for i in range(A,B+1)]
count = 0
for i in List:
    if i == i[::-1]:
        count += 1
print(count)

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

count = 0

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

Solution (Python):
A,B=input().split()
count=0

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

Solution (Python):

import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

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


import sys
input= lambda: sys.stdin.readline().rstrip()
sys.setrecursionlimit(10**9)
def pin(type=int):return map(type,input().split())
def tupin(t=int):return tuple(pin(t))
def lispin(t=int):return list(pin(t))

from collections import Counter
def resolve():
    A,B=pin()
    cnt=0
    for i in range(A,B+1):
        temp=str(i)
        if temp==temp[::-1]:cnt+=1
    print(cnt)

resolve()

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

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

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):
    if str(i) == (str(i))[::-1]:
        cnt += 1
print(cnt)

Solution (Python):
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 = tuple(map(int,input().split()))

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

print(ans)

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())
c = 0
for i in range(a, b+1):
    st = str(i)
    for j in range(len(st)):
        if st[j] != st[-j-1]:
            break
    else:
        c += 1
print(c)

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

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

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

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

print(ans)

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):
    if i == int(str(i)[::-1]):
        count += 1

print(count)

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

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

print(ans)

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

Solution (Python):
a, b = map(int, input().split())
ans = []
for i in range(a, b+1):
    str_i = str(i)
    f = True
    for j in range(len(str_i)//2):
        if str_i[j] == str_i[-j-1]:
            continue
        else:
            f = False
    if f:
        ans.append(f)

print(len(ans))

Solution (Python):
import sys
import math
def isLoop(n):
    if (n[0] != n[4] or n[1] != n[3]):
        return False
    else:
        return True
a, b = map(int, input().split())
cnt = 0
for i in range(a, b + 1):
    if (isLoop(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())

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())
t = a
c = 0
while t <= b:
  k = str(t)
  hoge = k[::-1]
  poge = int(hoge)
  if poge == t:
    c += 1
  t += 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 == s[::-1]:
    ans += 1
print(ans)

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

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

    print(ans)


if __name__ == "__main__":
    main()

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

import sys
import math
from bisect import bisect_left, bisect_right, insort_left, insort_right
from collections import defaultdict, deque, Counter
from copy import deepcopy
from fractions import gcd
from functools import lru_cache, reduce
from heapq import heappop, heappush
from itertools import accumulate, groupby, product, permutations, combinations, combinations_with_replacement
from math import ceil, floor, factorial, log, sqrt, sin, cos
from operator import itemgetter
from string import ascii_lowercase, ascii_uppercase, digits
sys.setrecursionlimit(10**7)
rs = lambda: sys.stdin.readline().rstrip()
ri = lambda: int(rs())
rf = lambda: float(rs())
rs_ = lambda: [_ for _ in rs().split()]
ri_ = lambda: [int(_) for _ in rs().split()]
rf_ = lambda: [float(_) for _ in rs().split()]
INF = float('inf')
MOD = 10 ** 9 + 7
PI = math.pi

A, B = ri_()
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 i in range(a,b+1):
  i = str(i)
  flg = 0
  for j in range(len(i)//2):
    if i[j] != i[-j-1]:
      flg = 1
  if flg == 0:
    res += 1
print(res)

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

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

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

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

Solution (Python):
a,b = map(int,input().split())
cnt = 0
for i in range(a,b+1):
    lst = list(str(i))
    if lst[0] == lst[-1] and lst[1] == lst[-2]:
        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]:
        cnt += 1

print(cnt)

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

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

count = 0
for i in range(a, b+1):
  s = str(i)
  if s[:2] == s[3:][::-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())
cnt = 0
for i in range(A, B + 1):
    d = str(i)
    if d[0] == d[4] and d[1] == d[3]:
        cnt += 1
print(cnt)

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()

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

Solution (Python):

import sys


def f(n):
    '''
    >>> f(1)
    True
    >>> f(2)
    True
    >>> f(22)
    True
    >>> f(34)
    False
    >>> f(565)
    True
    >>> f(789)
    False
    '''
    def g(n, m):
        return n // m % 10

    head = tail = 1
    while n // head > 10:
        head *= 10
    while head >= tail:
        if g(n, head) != g(n, tail):
            return False
        head //= 10
        tail *= 10
    return True

def solve(A: int, B: int):
    return sum(map(f, range(A, B+1)))


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  
    B = int(next(tokens))  
    print(solve(A, B))

def test():
    import doctest
    doctest.testmod()

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

Solution (Python):
a, b = map(int, input().split())
s = 0
for n in range(a,b+1):
  n = str(n)
  l = len(n)
  for i in range(int((l+1)/2)):
    if n[i] != n[l-1-i]:
      break
    elif n[i] == n[l-1-i] and i == (l-1)/2:
      s+= 1
    else:
      continue
print(s)

Solution (Python):
a,b=map(int,input().split())
ans=0
for i in range(1,10):
  for j in range(10):
    for k in range(10):
      if a<=i*10001+j*1010+k*100<=b:
        ans+=1
print(ans)

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

def it():
    for x in range(a, b+1):
        x = str(x)
        if x[0] == x[4] and x[1] == x[3]:
            yield 1

print(sum(it()))

Solution (Python):
a, b = map(int,input().split())
count = 0
for i in range(a, b+1):
    j = str(i)
    if j[0]==j[4] and j[1]==j[3]:
        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):
def resolve():
    
    
    
    a, b = list(map(int, input().split()))
    
    
    
    
    
    

    cnt = 0
    for i in range(a, b+1):
        N=[]
        j = i
        while j >= 1:
            N.append(j % 10)
            j = j // 10
 
        if N == list(reversed(N)):
            cnt += 1

    print(cnt)
resolve()

Solution (Python):
from sys import stdin


def find_palindromic(s):
    TF = False
    for i in range(len(s)//2):
        if s[i] != s[-i-1]:
            break
    else:
        TF = True
    return TF


if __name__ == "__main__":
    _in = [_.rstrip() for _ in stdin.readlines()]
    A, B = list(map(int,_in[0].split(' ')))  
    
    cnt = 0
    for i in range(A,B+1):
        if find_palindromic(str(i)):
            cnt += 1
    
    print(cnt)

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

Solution (Python):
A,B = list(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):
    c = str(i)
    if c==c[::-1]:
        ans += 1
print(ans)