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 = (int(x) for x in 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):
a,b = map(int, input().split())

cnt = 0
for i in range(a, b+1):
    i = str(i)
    flg = True
    
    for j in range(int(len(i)/2)+1):    
        if i[j] == i[-j-1]:
            pass
        else:
            flg = False
    if flg:
        cnt += 1
print(cnt)

Solution (Python):
def check(arr):
  for j in range(len(arr) // 2):
    if(num[j] != num[len(arr) - 1 - j]):
      return False
  return True

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

cnt = 0
for i in range(a, b+1):
  num = list(map(int, list(str(i))))
  if(check(num)):
    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 str(k[0]+k[1]) == str(k[4]+k[3]):
        ans += 1
print(ans)

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

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

    if str_i == reversed_i:
        count_target += 1

print(count_target)

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

for i in range(A, B + 1):
    str_i = str(i)
    reversed_i = ''
    for n_th_i in reversed(range(len(str_i))):
        reversed_i += str_i[n_th_i]

    if str_i == reversed_i:
        count_target += 1

print(count_target)

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

Solution (Python):
input_one = input().split()
i = int(input_one[0])
two = input_one[1]
count = 0



while  i <= int(two):
    
    i = str(i)
    if i[0] == i[4]:
        if i[1] == i[3]:
            count += 1

    i = int(i) + 1
print(count)

Solution (Python):
def ifKaibun(i):
  s=str(i)
  return s==s[::-1]

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

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

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

Solution (Python):
def issymmetry(S):
    sym = 1
    N = len(S)
    if N%2 == 0:
        for i in range(0,N//2-1):
            if S[N//2+i] != S[N//2-1-i]:
                sym = 0
                break
    else:
        for i in range(0,N//2+1):
            if S[N//2-i] != S[N//2+i]:
                sym = 0
                break
    return(sym)

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

ans=0
for i in range(A,B+1):
    if issymmetry(str(i)):
        ans+=1

print(ans)

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

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

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

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

total = 0
for i in range(A,B+1):
  if i >= A and i <= B:
    if str(i) == "".join(reversed(str(i))):
      total += 1
print(total)

Solution (Python):
a,b=map(lambda x: int(x), 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, open(0).read().split())

cnt=0
for num in range(A,B+1):
    if (str(num) == str(num)[::-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())
count=0
while A<=B:
  li=list(map(int,str(A)))
  if li[0]==li[4] and li[1]==li[3]:
    count+=1
  A+=1
print(count)

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 = list(map(int, input().split()))
count = 0
for i in range(A,B+1):
    C = str(i)
    if C[0] == C[4] and C[1] == C[3]:
        count += 1
    else:
        pass
print(count)

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

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

Solution (Python):
a,b=input().split()
c=int(a[:3]+a[1]+a[0])
if int(a)>c:
  x=c//100+1
else:
  x=c//100
d=int(b[:3]+b[1]+b[0])
if int(b)<d:
  y=d//100-1
else:
  y=d//100
print(y-x+1)

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

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

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

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

ans = 0
for i in range(A,B+1):
    s = str(i)
    s_reversed = s[::-1]
    if s == s_reversed:
        ans += 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):
def func(num):
    ws=0
    while num>0:
        qa=num%10
        ws=ws*10+qa
        num = num//10
    return ws
a,b=map(int,input().split())
print(sum(i==func(i) for i in range(a,b+1)))

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

Solution (Python):
A,Z = map(str, input().split())
a=[str(x) for x in A]
z=[str(x) for x in Z]
aa =int(a[0]+a[1]+a[2])
aaa =int(a[0]+a[1]+a[2]+a[1]+a[0])
zz =int(z[0]+z[1]+z[2])
zzz =int(z[0]+z[1]+z[2]+z[1]+z[0])
gap = (zz-aa)+1
cnt = 0
if aaa<int(A):
    cnt-=1
if zzz>int(Z):
    cnt-=1
print(gap+cnt)

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


def kaibun(x):

    half = len(x) // 2
    front = x[:half][::-1]
    back = x[half+1:]

    if front == back:
        return True

    else:
        return False


for i in range(A, B+1):
    list_i = list(str(i))
    func = kaibun(list_i)

    if func:
        ans += 1

print(ans)

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

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

def batch_number(num):
    return num == int(''.join(reversed(list(str(num)))))

ret = 0
for n in range(A, B + 1):
    if batch_number(n):
        ret += 1
print(ret)

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

def reverseDigits(n):
    l = []
    r = 0
    j = 0
    while(n > 0):
        l.append(n % 10)
        n //= 10
    for i in l[::-1]:
        r += i * (10 ** j)
        j += 1
    return r

ans = 0
for i in range(A,B+1):
    r = reverseDigits(i)
    if i == r:
        ans += 1
print(ans)

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

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

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

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

Solution (Python):
A, B = map(int, input().split())
ans = 0
for i in range(A, B+1):
    _i = list(str(i))
    if _i[0:len(_i)//2]==list(reversed(_i))[0:len(_i)//2]:
        ans += 1
print(ans)

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

for num in range(a, b+1):
    s = list(str(num))
    s_num = len(s)
    t = []
    for i in range(1, s_num+1):
        x = str(s[-i])
        t.append(x)
    if s == t:
        sum += 1

print(sum)

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

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
from bisect import bisect

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

A, B = MAP()

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 str(i) == ''.join(reversed(str(i))):

        count+=1

        
print(count)

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

        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):
def slove():
    import sys
    input = sys.stdin.readline
    a, b = list(map(int, input().rstrip('\n').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)


if __name__ == '__main__':
    slove()

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

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

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

counter = 0

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

print(counter)

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

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

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

bb090()

Solution (Python):
import sys
from functools import reduce
import copy
import math
from pprint import pprint


sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def int_inputs(num_of_input):
    ins = [int(input()) for i in range(num_of_input)]
    return ins


def solve(inputs):
    [A, B] = string_to_int(inputs[0])
    count = 0
    for n in range(A, B+1):
        s = str(n)
        front = []
        back = []
        if len(s) % 2 == 0:
            half = len(s) // 2
            front = list(s[:half])
            back = list(s[half:])
        else:
            half = len(s) // 2
            front = list(s[:half])
            back = list(s[half+1:])
        if front == list(reversed(back)):
            count += 1
    return count


def string_to_int(string):
    return list(map(int, string.split()))


if __name__ == "__main__":
    ret = solve(inputs(1))
    print(ret)

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

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

print(c)

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

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

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

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

print(count)

"""
    print(i//10000)
    print(i%10)
    print((i%10000)//1000)
    print(i%100//10)
"""

Solution (Python):
def is_palindromic(num):
    tmp = list(str(num))
    while len(tmp) != 1:
        if tmp[0] == tmp[-1]:
            tmp.pop(0)
            tmp.pop(-1)
        else:
            return False
    return True


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

print(ans)

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

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

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

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

print(count)

Solution (Python):
A, B = map(int, input().split())
def kaibunsu(X):
  a = X//10000
  b = (X - a*10000)//1000
  c = (X - a*10000 - b*1000)//100
  d = (X - a*10000 - b*1000 - c*100)//10
  e = X - a*10000 - b*1000 - c*100 - d*10
  x = e*10000 + d*1000 + c*100 + b*10 + a
  return x
count = 0
for i in range(A,B+1):
  if i == kaibunsu(i):
    count += 1
print(count)

Solution (Python):

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

ans = 0
for i in range(a,b+1):
    s = ''
    s = str(i)
    if s[0:1]==s[4:5] and s[1:2]==s[3:4]:
        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())
c=0
for i in range(a,b+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())
ans=0
for i in map(str,range(a,b+1)):
    if i==i[::-1]:
        ans+=1
print(ans)

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

c = A
ans = 0
while c <= B:
    c_str = str(c)
    if c_str[0] == c_str[-1]:
        if c_str[1] == c_str[-2]:
            ans += 1
    c += 1
    
print(ans)

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

cnt = 0

for num in range(a, b + 1):
    s = str(num)
    k = len(s) // 2
    isOk = True
    for c in range(k):
        if s[c] != s[-c-1]:
            isOk = False
            break
    
    if isOk:
        cnt += 1

print(cnt)

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

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

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

Solution (Python):

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


if __name__ == "__main__":
    main()

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):
def roop(n):
  s=str(n)
  if s==s[::-1]:
    return 1
  else:
    return 0

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

ans=0
for i in range(A,B+1):
  ans+=roop(i)
print(ans)

Solution (Python):
s=list(input().split())
a=int(s[0])
b=int(s[1])
count=0
for i in range(a,b+1):
    number=list(str(i))
    antinumber=list(reversed(number))
    if int(''.join(number))-int(''.join(antinumber))==0:
        count+=1
print(count)

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

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

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

Solution (Python):
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    

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

print(ans)

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

ans = 0
for i in range(A, B+1):
    buf = str(i)
    is_par = True
    for u in range(len(buf)//2):
        if buf[u] != buf[-1-u]:
            is_par = False
            break
    if is_par:
        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):
def is_circular(n):
    s = str(n)
    l = len(s)
    for i in range(l//2):
        if s[i] != s[l-i-1]:
            return False
    else:
        return True

A, B = (int(x) for x in input().split())
print(sum(1 for i in range(A, B+1) if is_circular(i)))

Solution (Python):
A, B = map(int, input().split())
ans = 0
for x in range(A, B+1):
    if int("".join(list(reversed(str(x))))) == x:
        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):
    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):
    if str(i) == str(i)[::-1]:
        count += 1
print(count)

Solution (Python):
a,b = map(int, input().strip().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 str(i) == str(i)[::-1]:count += 1
print(count)

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



A = int(A)
B = int(B)





count = 0
while A <= B:
  As = str(A)
  Ar = int(As[::-1])

  if A == Ar:
    
    count+=1
  A +=1

print(count)

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

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

Solution (Python):
A, B = map(int, input().split())
ans = 0
for i in range(A, B+1):
    kaibun = str(i)
    for j in range(len(kaibun) // 2):

        if kaibun[j] != kaibun[-1-j]:
            break
        elif j == (len(kaibun) // 2) - 1:
            ans += 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())
cnt=0
for i in range(a,b+1):
    thelist=list(str(i))
    revlist=thelist[::-1]
    if thelist == revlist:
        cnt+=1
print(cnt)

Solution (Python):
a, b = map(int,input().split())
cnt = 0
def kaibun(n):
    s = str(n)
    rs = reversed(s)
    for i,j in zip(s,rs):
        if i != j:
            return False
    return True
for i in range(a, b+1):
    if kaibun(i):
        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[-1] and s[1]==s[-2]:
        ans += 1
        
print(ans)

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

Solution (Python):
A, B = map(int, input().split())
pal = [10001, 1010, 100]
count = 0

for i in range(1, 10):
    for j in range(10):
        for k in range(10):
            if A <= pal[0] * i + pal[1] * j + pal[2] * k <= B:
                count += 1
            else:
                continue

print(count)

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

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

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

print(count)

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

for i in range(N):
  count += (1 if str(AB[i]) == str(AB[i])[::-1] else 0)

print(count)

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

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

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

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

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

Solution (Python):
def main():
  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)
  
if __name__ == '__main__':
  main()

Solution (Python):

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

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

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

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

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

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

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

print(num)

Solution (Python):
a, b = map(int, input().split())
count = 0
for i in range(a, b+1):
    s = str(i)
    for j in range(0, len(s)//2 + 1):
        if s[j] != s[-j-1]:
            break
    else:
        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
print(count)

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

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

counter = 0
for num in range(A,B+1):
  num_str = str(num)
  num_str_rev = num_str[::-1]
  if num_str == num_str_rev:
    counter += 1
print(counter)

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

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

count = 0
for i in range(a, b + 1):
  j = str(i)
  k = list(reversed(j))
  k = "".join(k)
  
  if j == k:
    count += 1
print(count)

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

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

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

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

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

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):
L =[0 for i in range(100000)]
for i in range(100000):
  N = i
  a = N//10000
  b = (N//1000)%10
  d = (N//10)%10
  e = N%10
  
  if a == e and d == b:
    L[i] = 1

A, B = map(int, input().split())
print(sum(L[A:B+1]))

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

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

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

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

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

cnt = 0
for num in range(a, b + 1):
    num_str = str(num)
    if num_str == num_str[::-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())
print(sum(n == n[::-1] for n in map(str, range(A, B+1))))

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

input = sys.stdin.readline


class AtCoder:
    def main(self):
        A, B = map(int, input().split())

        ans = 0
        for n in range(A, B + 1):
            s_n = str(n)
            f = True
            for i in range(len(s_n) // 2):
                if s_n[i] != s_n[-(i + 1)]:
                    f = False
                    break
            if f:
                ans += 1

        print(ans)


if __name__ == '__main__':
    AtCoder().main()

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

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

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

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

Solution (Python):
print(sum(s[0]==s[4]for s in map(str,range(*map(sum,enumerate(map(int,input().split())))))if s[1]==s[3]))

Solution (Python):
print(sum(s[0]==s[4]and s[1]==s[3]for s in map(str,range(*map(sum,enumerate(map(int,input().split())))))))

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