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):
n,k=map(int,input().split())
ans=chk=0
for i in range(n,k+1):
    t=str(i)
    ans+=t==t[::-1]
print(ans)

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

Solution (Python):
A,B = (int(i) for i in 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())
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())

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

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

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

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

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

Solution (Python):
A,B = map(int,input().split())
count = 0
for a in range(A//10000,B//10000+1):
    for b in range(10):
        for c in range(10):
            p = a * 10001 + b * 1010 + c * 100
            if p >= A and p <= B:
                count += 1
print(count)

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

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

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



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

print(count)

Solution (Python):

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

ans = 0
for n in range(A,B+1):
    norm = str(n)
    rev = norm[::-1]
    
    if norm == rev:
        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 == s[::-1]:
        ans += 1
print(ans)

Solution (Python):
a, b = map(int, input().split())
def kaibun(n):
    n = list(str(n))
    if n[0] == n[4] and n[1] == n[3]:
        return 1
    else:
        return 0
cnt = 0
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):
    a=list(str(i))
    if a[0]==a[4] and a[1]==a[3]:ans+=1
print(ans)

Solution (Python):


def main():
    a, b = map(int, input().split())
    cnt = 0

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

if __name__ == '__main__':
    main()

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

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

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

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

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

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

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

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

cnt = 0
for i in range(a, b+1):
    if is_kb(i):
        cnt += 1
print(cnt)

Solution (Python):
A,B = map(int, input().split())
ans = 0
for i in range(A, B+1):
	s = i%10
	t = int(i/10000)
	u = int(i/10)%10
	v = int(i/1000)%10
	if (s==t)&(u==v):
		ans += 1
print(ans)

Solution (Python):
A, B = map(int, input().split())
count = 0
for a in range(A // 10000, B // 10000 + 1):
  for b in range(10):
    for c in range(10):
      p = a * 10001 + b * 1010 + c * 100
      if p >= A and p <= B:
        count += 1
print(count)

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

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

Solution (Python):

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

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

    print(ans)

if __name__ == "__main__":
        main()

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

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

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

print(num)

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

Solution (Python):
def kaibun(n):
  m = list(str(n))[::-1]
  if m == list(str(n)):
    return True
  else:
    return False

A,B = map(int,input().split())
c = 0
for d in range(B-A+1):
  if kaibun(A+d):
    c += 1
print(c)

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

Solution (Python):
start, end = map(int, input().split())

result = 0
for i in range(start, end + 1):
    s = str(i)
    if s == s[::-1]:
        result += 1
print(result)

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

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

Solution (Python):
"""
https://abc090.contest.atcoder.jp/tasks/abc090_b
"""
[a,b]=[int(i) for i in input().split()]
c=0
for i in range(a,b+1):
    if str(i)==str(i)[::-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 = 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 n in range(A, B + 1):
	num = str(n)
	if num == num[::-1]:
		ans += 1
print(ans)

Solution (Python):
a, b = (int(_) for _ in input().split(' '))
answer = len([x for x in range(a, b + 1) if (x // 10000 == x % 10 and (x // 1000) % 10 == (x % 100) // 10)])
print(answer)

Solution (Python):
def f(k):
    k = str(k)

    for i in range(len(k) // 2):
        if k[i] != k[len(k) - i - 1]:
            return False

    return True

def main():
    A, B = [int(i) for i in input().split()]

    ans = 0
    for k in range(A, B + 1):
        if f(k):
            ans += 1

    print(ans)

main()

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

Solution (Python):
range_min,range_max = map(int,input().split())
palindromic = 0
for i in range(range_min,range_max+1):
    palindromic += 1 if str(i) == str(i)[::-1] else 0
print(palindromic)

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

cnt = 0
for i in range(a, b+1):
    i = str(i)
    rev = list(i)
    rev.reverse()
    if i == ''.join(rev):  
        cnt += 1
        
print(cnt)

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

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

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

Solution (Python):
A,B=map(int,input().split())
ans = 0
for x in range(A,B+1):
    s = str(x)
    l = len(s)
    pal = True
    for i in range(l//2 + 1):
        if s[i] != s[l-1-i]:
            pal = False
    if pal:
        ans += 1
print(ans)

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

print(cc)

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

def iskaibun(n):
    n = str(n)
    if n[0]==n[-1] and n[1] == n[-2]:
        return True
    else:
        return False

result = 0
for i in range(A,B+1):
    result += iskaibun(i)

print(result)

Solution (Python):
a, b = map(int, input().split())
print(sum(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):
    man = i // 10000
    sen = (i % 10000) // 1000
    ten = (((i % 10000) % 1000) % 100) // 10
    one = i % 10
    if man == one and sen == ten:
        cnt += 1

print(cnt)

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


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


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

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

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

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

print(cnt)

Solution (Python):

"""
Created on Wed Jun 13 17:57:26 2018


A以上B以下の回文数が何個あるか計算する
例) １１２１１

入力
11009 11332

出力
4


@author: Yuya
"""

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

count = 0

for a in range(1, 10):
    for b in range(10):
        for c in range(10):
            N = 10000*a + 1000*b + 100*c + 10*b + a
            if N >= A and N <= B:
                count = count + 1

print(count)

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

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

Solution (Python):
A,B = map(int,input().split())
i = 0
while A <= B:
    if(A//10000 is A%10 and (A%10000)//1000 is (A%100)//10):
        i+=1
    A+=1
print(i)

Solution (Python):
A, B = 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):
A,B =list(map(int, input().split()))
numbers = []
count = 0

for i in range(A,B+1):
    numberString = str(i)
    numbers.append(numberString)

for number in numbers:
    reverse = number[::-1]
    if number == reverse:
        count += 1

print(count)

Solution (Python):

line=input()
line=line.rstrip().split(" ")
line1=int(line[0])
line2=int(line[1])

count=0
for i in range(line1,line2+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())

res = 0

for num in range(A, B + 1):
    if num // 10000 == num % 10 and (num % 10000) // 1000 == (num % 100) // 10:
        res += 1

print(res)

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

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

Solution (Python):
A, B = map(int, input().split())
ans = 0
for n in range(A, B + 1):
    s = str(n)
    if s[0] == s[-1] and s[1] == s[-2]:
        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 = (int(i) for i in input().split())

count = 0
for i in range(B-A+1):
    number = A+i
    charnum = str(number)
    if(charnum[0]==charnum[4] and charnum[1]==charnum[3]):
        count = count + 1
  
print(count)

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

Solution (Python):
def f(x):
    x = str(x)
    if x[0]==x[4] and x[1]==x[3]:
        return True
    else:
        return False
a,b = map(int,input().split())
cnt=0
for i in range(a,b+1):
    cnt += 1 if f(i) else 0
print(cnt)

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

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

A_int = int(A)
B_int = int(B)
count = 0
for a in range(A_int,B_int+1):
	fig = list(str(a))
	if(fig[0]==fig[4] and fig[1]==fig[3]):
		count += 1

print(count)

Solution (Python):



C = input().split()
A = int(C[0])
B = int(C[1])
count=0

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

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

Solution (Python):
from sys import stdin

a, b = stdin.readline().rstrip().split()
counter = 0

c = int(a)
d = int(b)

for i in range (d - c + 1):
    
    digit_1 = str(i + c)[:1]
    digit_2 = str(i + c)[1:2]
    digit_3 = str(i + c)[3:4]
    digit_4 = str(i + c)[4:5]
  
    if(digit_1 == digit_4 and digit_2 == digit_3):
        counter += 1

print(counter)

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

count = 0

for i in range(A, B+1):
    num = []
    while i != 0:
        num.append(i%10)
        i = int(i/10)
    
    if num[0] == num[4] and num[1] == num[3]:
        count += 1


print(count)

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

def main():
    count = 0
    for num in range(A, B + 1):
        s = str(num)
        pri = s[0:3] 
        sec = s[4:1:-1] 
        if pri == sec:
            count += 1
    print(count)

if __name__ == "__main__":
    main()

Solution (Python):
A, B = map(int, input().split())
cnt = 0
for n in range(A,B+1):
  n_str = str(n)
  n_len = len(n_str)
  is_kaibun = True
  for i in range(n_len//2):
    if n_str[i] != n_str[n_len-1-i]:
      is_kaibun = False
  if is_kaibun is True:
    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 = list(map(int, input('').split()))
count = 0
for x in range(A, B + 1):
  t = str(x)
  if all(t[s] == t[-(s+1)] for s in range(len(t) // 2)):
    count += 1

print(count)

Solution (Python):
A, B = list(map(int, input('').split()))
count = 0
for x in range(A, B + 1):
  t = str(x)
  ret = True
  for s in range(len(t) // 2):
    if t[s] != t[-(s+1)]:
      ret = False
      break
  if ret:
    count += 1

print(count)

Solution (Python):
a,b=[int(i) for i in 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 ,raw_input().split())
  
result = 0
for i in range(A,B+1):
    r = str(i)
    flg = True
    for j in range(int(len(r)/2)):
        if r[j] != r[len(r) - j - 1]:
            flg = False
    if flg:
        result += 1

print(result)

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

kai = []

for i in range(1,10):
    for j in range(0,10):
        for k in range(0,10):
            num = int(str(i)+str(j)+str(k)+str(j)+str(i))
            kai.append(num)
            
kai2 = filter((lambda x: x >= A and x <= B), kai)
print(len(list(kai2)))

Solution (Python):



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

ans = 0
for i in range(a, b+1):

    
    str1 = str(i)
    
    if str1[0] == str1[4] and str1[1] == str1[3]:
        ans += 1
    
    i += 1

print(ans)

Solution (Python):
f, t = map(int, input().split(' '))
kaibun = 0
for s in range(f, t + 1):
     if str(s) == str(s)[::-1]:
        kaibun += 1
print(kaibun)

Solution (Python):
list = list(int(i) for i in input().split())
count = 0

for i in range(list[0], list[1]+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())
c = 0
for i in range(a,b+1):
  if i%10 == i//10000 and (i//10)%10 == (i//1000)%10 :
    c+=1
print(c)

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

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

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

Solution (Python):
a,b = map(int, raw_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):
def main6():
    str = input('');

    buf = str.split();
    num = [];
    result = 0;
    for i in range(2):
        num.insert(i,int(buf[i]));
    for i in range(num[1] - num[0] + 1):
        k = num[0] + i;
        k1 = int(k/10000)%10;
        k2 = int(k/1000)%10;
        k4 = int(k/10)%10;
        k5 = k%10;
        if k1 == k5 and k2 == k4:
            result = result + 1;
    print(result);



if __name__ == '__main__':
    
    
    main6()

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

count = 0

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

print(count)

Solution (Python):
A, B = map(int, input().split())
count = 0
for i in range(10):
    for j in range(10):
        for k in range(10):
            if(A <= 10000*i + 1000*j + 100*k + 10*j +i <= B):
                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())
ct=0
for i in range(A,B+1):
    s=str(i)
    if s==s[::-1]:
        ct+=1
print(ct)

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

Solution (Python):

a, b = [int(s) for s in input().split()]
c = int(str(a)[:3])
d = int(str(b)[:3])
count = 0
for x in range(c, d + 1):
    x = str(x)
    y = int(x + x[1] + x[0])
    if a <= y <= b:
        count += 1
print(count)

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

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

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

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

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

print(ans)

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

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

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

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

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

print(count)

Solution (Python):
X = list(int(i) for i in input().split())
cnt = 0

for i in range(X[0], X[1]+1):
    a = int(i / 10000 % 10)
    b = int(i / 1000 % 10)
    c = int(i / 100 % 10)
    d = int(i / 10 % 10)
    e = int(i % 10)
    if a == e and b == d:
        cnt += 1

print("%d" % cnt)

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

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

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

print(num)

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


def main():
    A, B = [int(x) for x in stdin.readline().rstrip().split()]
    print(len([x for x in range(A, B + 1) if str(x) == str(x)[::-1]]))


if __name__ == '__main__':
    main()

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

Solution (Python):
import math as m
C = input().split()
A = int(C[0])
B = int(C[1])

count = 0
for i in range(A, B+1):
    i2 = i
    change = 0
    keta = int(m.log(i, 10))
    for j in range(keta, -1, -1):
        change += int(i2/(10**j))*(10**(keta-j))
        i2 -= int(i2/(10**j))*(10**j)
    
    if i == change:
        count += 1

print(count)

Solution (Python):
A,B = map(int,input().split())
ans = 0
for n in range(A,B+1):
  s = str(n)
  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):
    ls = list(str(i))
    if ls == ls[::-1]:
        ans += 1

print(ans)

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

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

print(cnt)

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

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

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

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

counter = 0
for N in range(A,B+1):
    N_list = list(str(N))
    N_list_inv = N_list[::-1]
    if N_list == N_list_inv:
        counter += 1
print(counter)

Solution (Python):
import math
import sys
from collections import Counter
def getinputdata():

    
    array_result = []
    
    data = input()

    
    array_result.append(data.split(" "))

    flg = 1

    try:


        while flg:

            data = input()

            array_temp = []

            if(data != ""):
                
                array_result.append(data.split(" "))

                flg = 1

            else:

                flg = 0
    finally:


        return array_result





arr_data = getinputdata()

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



arr_list=[]
for i in range(1,10):
    
    for j in range(0,10):
        
            for k in range(0,10):
                
                arr_list.append(int(str(i)+str(j)+str(k)+str(j)+str(i)))
                
                
arr2 = list(filter(lambda x : x >= a and x<=b, arr_list))

print(len(arr2))

Solution (Python):
A, B = map(int, raw_input().split())
print len(filter(lambda x: str(x) == str(x)[::-1], range(A, B+1)))

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

num = value[0]
count = 0

while num <= value[1]:
  if num // 10000 == num % 10 and num // 1000 % 10 == num % 100 // 10:
    count += 1
  num += 1
  
print(count)

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

count = 0
for i in range(int(a), int(b)+1):
    flag = 1
    
    for j in range(int(len(str(i))/2)):
        
        if str(i)[j]!=str(i)[-j-1]:
            flag = 0
            break
    if flag==1:
        count +=1
print(count)

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

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

Solution (Python):
if __name__ == '__main__':
    A, B = raw_input().split()
    c = 0
    while int(A) <= int(B):
        if A[0] == A[4] and A[1] == A[3]:
            c += 1
        A = str(int(A)+1)
    print c

Solution (Python):


a, b = map(int, input().split())
count = 0
for v in range(a, b+1):
    t = str(v)
    n = len(t)
    if all([t[i] == t[n-i-1] for i in range(int(n/2))]):
        count += 1
print(count)

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

Solution (Python):


a, b = [int(x) for x in input().split()]
flag, count = 0, 0
for i in range(a,b+1):
    flag = 0
    si = str(i)
    for j in range(int(len(si)/2)):
        if si[j] == si[-(j+1)]:
            pass
        else:
            flag = 1
    if flag == 0:
        count += 1
print(count)

Solution (Python):
import sys
import io


def run(input: io.TextIOBase, output: io.TextIOBase):
    l = input.readline().split()
    a = int(l[0])
    b = int(l[1])

    count = 0

    def is_anagram(x: int):
        x_str = str(x)
        for i in range(0, len(x_str)//2):
            if x_str[i] != x_str[-i-1]:
                return False
        return True

    for x in range(a, b + 1):
        if is_anagram(x):
            count += 1
    output.write(str(count) + '\n')


if __name__ == '__main__':
    run(sys.stdin, sys.stdout)

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


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

for i in range(a, b + 1):
    if isPlindrome(i):
        count += 1

print(count)

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

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

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

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

Solution (Python):
a,b = input().split()
r = int(b[0:3])-int(a[0:3])+1
if int(a[3:5]) > int(a[0:2][::-1]):
  r -= 1
if int(b[3:5]) < int(b[0:2][::-1]):
  r -= 1
print(r)

Solution (Python):
import math
import numpy as np
from operator import mul

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

for i in range(A,B+1):
    pl = [int(x) for x in list(str(i))]
    if pl[0] == pl[4] and pl[1] == pl[3]:
        n += 1
        
print(n)

Solution (Python):
def is_palindromic(n):
    if str(n) == str(n)[::-1]:
        return True
    else:
        return False

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

Solution (Python):

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

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

Solution (Python):
A, B = [int(i) for i in 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())
c = 0
for i in range(a,b+1):
    I = list(str(i))
    if I[0]==I[4] and I[1] == I[3]:
        c+=1
print(c)

Solution (Python):
def kaibun(n):
	s=str(n)
	sz=len(s)
	for i in range(int(sz//2)):
		if s[i]!=s[sz-i-1]:
			return False
	return True

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

if __name__=="__main__":
	main()

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

for i in range(a, b+1):
  ok = True
  c = str(i)
  for j in range(int(len(c) / 2)):
    if c[j] != c[-j-1]:                                                                                                    
      ok = False
      break
  if ok:
    result += 1

print(result)

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

count = 0
for i in range(a, b + 1):
    s = i // 10000
    t = (i % 10000) // 1000
    u = (i % 100) //  10
    v = i % 10
    if s == v and t == u:
        count += 1
print(count)

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

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