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



Sample input:
11009 11332


Sample output:
4

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
d = []
for i in range(1,10):
    for j in range(10):
        for k in range(10):
            d.append(10001*i+1010*j+100*k)
d.sort()
import bisect
print(bisect.bisect_right(d,B)-bisect.bisect_right(d,A))

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
d = []
for i in range(1,10):
    for j in range(10):
        for k in range(10):
            d.append(10001*i+1010*j+100*k)
d.sort()
import bisect
print(bisect.bisect_left(d,B)-bisect.bisect_left(d,A))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main(a, b):
    ans = 0

    for i in range(a, b + 1):
        s = str(i)

        if s[:len(s) // 2] == s[(len(s) // 2) + 1:]:
            ans += 1

    print(ans)


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

Submission status: Wrong Answer

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

cnt = 0
for n in range(A, B + 1):
    s = str(n)
    if s[:2] == s[3:]:
        cnt += 1

print(cnt)

Submission status: Wrong Answer

Solution code:
def main():
    a, b = map(int, input().split())
    ans = (b-a)//100
    if int(str(a)[-2:]) <= int(str(a)[:2]) and int(str(b)[:2]) <= int(str(b)[-2:]):
        ans += 1
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
def main():
    a, b = map(int, input().split())
    ans = (b-a)//100
    if int(str(a)[-2:]) <= int(str(a)[:1]) and int(str(b)[-2:]) <= int(str(b)[1:]):
        ans += 1
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
def main():
    a, b = map(int, input().split())
    print(b-a)
    ans = (b-a)//100
    if int(str(a)[-2:]) <= int(str(a)[:1]) and int(str(b)[-2:]) <= int(str(b)[1:]):
        ans += 1
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

cnt=0
for i in range(a,b+1):
  s=str(i)
  if len(s)==1:
    cnt+=1
  for j in range(len(s)//2):
    same=1
    if s[j]!=s[-1*(j+1)]:
      same=0
    if same==1:
      cnt+=1
print(cnt)

Submission status: Wrong Answer

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

cnt=0
for i in range(a,b+1):
  s=str(i)
  for j in range(len(s)//2):
    same=1
    if s[j]!=s[-1*(j+1)]:
      same=0
    if same==1:
      cnt+=1
print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
ans = 0
for i in range(A,B+1):
    tmp = str(i)
    L = len(str(i))
    l = L//2
    if L%2 == 0:
        if tmp[:l] == tmp[l:]:
            ans += 1
    else:
        if tmp[:l] == tmp[l+1:]:
            ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
a = input().split(" ")
start = a[0]
start = list(map(int, start))
end = a[1]
end = list(map(int, end))

if (end[0] - start[0]) != 0:
    ans = (end[0] - start[0]  - 1) * 100 + end[1] * 10 + end[2] + 1 + (9 - start[1]) * 10 + (10 - start[2])
    if (start[1]*10 + start[0])  < (start[3] * 10 + start[4]) :
        ans -=   1

else:
    if (end[1] - start[1]) != 0:
        ans = (end[1] - start[1] - 1)  * 10 + end[2] + (10 - start[2])
        if (start[1]*10 + start[0])  < (start[3] * 10 + start[4]) :
            ans -=  1

        
    else:
        ans = end[2] - start[2] + 1
        if (start[1]*10 + start[0])  < (start[3] * 10 + start[4]) :
            ans -= 1

print(ans)

Submission status: Wrong Answer

Solution code:
a = input().split(" ")
start = a[0]
start = list(map(int, start))
end = a[1]
end = list(map(int, end))

if (end[0] - start[0]) != 0:
    ans = (end[0] - start[0]  - 1) * 100 + end[1] * 10 + end[2] + 1 + (9 - start[1]) * 10 + (10 - start[2])
    if (start[1]*10 + start[0]  < start[3] * 10 + start[4]) :
        ans -=   1

else:
    if (end[1] - start[1]) != 0:
        ans = (end[1] - start[1] - 1)  * 10 + end[2] + (10 - start[2])
        if (start[1]*10 + start[0]  < start[3] * 10 + start[4]) :
            ans -=  1

        
    else:
        ans = end[2] - start[2] + 1

print(ans)

Submission status: Wrong Answer

Solution code:
a = input().split(" ")
start = a[0]
start = list(map(int, start))
end = a[1]
end = list(map(int, end))

if (end[0] - start[0]) != 0:
    ans = (end[0] - start[0]  - 1) * 100 + end[1] * 10 + end[2] + 1 + (9 - start[1]) * 10 + (10 - start[2])
    if start[1]  < start[3] :
        ans -=   1
    else:
        if start[0] < start[4]:
            ans -= 1
else:
    if (end[1] - start[1]) != 0:
        ans = (end[1] - start[1] - 1)  * 10 + end[2] + (10 - start[2])
        if start[1]  < start[3] :
            ans -=   1
        else:
            if start[0] < start[4]:  
                ans -= 1
        
    else:
        ans = end[2] - start[2] + 1

print(ans)

Submission status: Wrong Answer

Solution code:
a = input().split(" ")
start = a[0]
start = list(map(int, start))
end = a[1]
end = list(map(int, end))

if (end[0] - start[0]) != 0:
    ans = (end[0] - start[0]  - 1) * 100 + end[1] * 10 + end[2] + 1 + (9 - start[1]) * 10 + (10 - start[2])
    if start[1]  < start[3] :
        ans -=   1
    else:
        if start[0] < start[4]:
            ans -= 1
else:
    if (end[1] - start[1]) != 0:
        ans = (end[1] - start[1] - 1)  * 10 + end[2] + (10 - start[2])
        
    else:
        ans = end[2] - start[2] + 1

print(ans)

Submission status: Wrong Answer

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

count = 0

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

Submission status: Wrong Answer

Solution code:
from sys import stdin

a, b = [int(x) for x in stdin.readline().rstrip().split()]

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

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
cnt=0

for i in range(A,B+1):
    t=list(str(i))
    if t[::-1][0]=="0":
        print("No")
        pass
    else:
        if t==t[::-1]:
            cnt+=1
        
print(cnt)

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
cnt=0

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

a,b=map(str,input().split())
a_l=list(a)
b_l=list(b)
cnt=0
for l in range(int(a),int(b)):
            l_i=list(str(l))
            if l_i[0]==l_i[-1] and l_i[1]==l_i[-2]:
                        cnt+=1
print(cnt)

Submission status: Wrong Answer

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

a01 = int(A[0:2])
a34 = int(A[3:5])
if a01 < a34:
  amin = int(A[1:3]) + 1
else:
  amin = int(A[1:3])

b01 = int(B[0:2])
b34 = int(B[3:5])
if b01 <= b34:
  bmin = 100 - int(B[1:3]) - 1
else:
  bmin = 100 - int(B[1:3])

n0 = int(B[0]) - int(A[0]) + 1

print(n0 * 100 - amin - bmin)

Submission status: Wrong Answer

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

a01 = int(A[0:2])
a43 = int(''.join(list(reversed(A[3:5]))))
if a01 < a43:
  amin = int(A[1:3]) + 1
else:
  amin = int(A[1:3])

b01 = int(B[0:2])
b43 = int(''.join(list(reversed(B[3:5]))))
if b01 <= b43:
  bmin = 100 - int(B[1:3]) - 1
else:
  bmin = 100 - int(B[1:3])

n0 = int(B[0]) - int(A[0]) + 1

print(n0 * 100 - amin - bmin)

Submission status: Wrong Answer

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

a01 = int(A[0:2])
a43 = int(''.join(list(reversed(A[3:5]))))
if a01 <= a43:
  amin = int(A[1:3])
else:
  amin = int(A[1:3]) - 1

b01 = int(B[0:2])
b43 = int(''.join(list(reversed(B[3:5]))))
if b01 <= b43:
  bmin = 100 - int(B[1:3]) - 1
else:
  bmin = 100 - int(B[1:3])

n0 = int(B[0]) - int(A[0]) + 1

print(n0 * 100 - amin - bmin)

Submission status: Wrong Answer

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

a01 = int(A[0:2])
a43 = int(''.join(list(reversed(A[3:5]))))
if a01 < a43:
  amin = int(A[1:3])
else:
  amin = int(A[1:3]) - 1

b01 = int(B[0:2])
b43 = int(''.join(list(reversed(B[3:5]))))
if b01 < b43:
  bmin = 100 - int(B[1:3]) - 1
else:
  bmin = 100 - int(B[1:3])

n0 = int(B[0]) - int(A[0]) + 1

print(n0 * 100 - amin - bmin)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b = input().split()
cnt = 0
A1 = int(a[1])*10+int(a[0])
A2 = int(a[-2])*10+int(a[-1])
B1 = int(b[1])*10+int(b[0])
B2 = int(b[-2])*10+int(b[-1])
if A1 -A2 >= 0:
    cnt += 1
if B1 - B2 > 0:
    cnt -= 1
cnt += (int(b)-int(a))//100
print(cnt)

Submission status: Wrong Answer

Solution code:
a,b = input().split()
cnt = 0
A1 = int(a[0])*10+int(a[1])
A2 = int(a[-2])*10+int(a[-1])
B1 = int(b[0])*10+int(b[1])
B2 = int(b[-2])*10+int(b[-1])
if A1 -A2 >= 0:
    cnt += 1
if B1 - B2 > 0:
    cnt -= 1
cnt += (int(b)-int(a))//100
print(cnt)

Submission status: Wrong Answer

Solution code:
def is_palindrome(s: str) -> bool:
    return s[:len(s)//2] == s[-1*(len(s)//2):]


a, b = [int(i) for i in input().split()]
print([is_palindrome(str(n)) for n in range(a, b+1)].count(True))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n, m = map(int, input().split())

if n==1 and m==1:
  print(1)
elif n==1 or m==1:
  c = max(0, m-2)
  d = max(c, n-2)
  print(d)
else:
  print((n-2)*(m-2))

Submission status: Wrong Answer

Solution code:
n, m = map(int, input().split())

if n==1:
  print(m-2)
elif m==1:
  print(n-2)
else:
  print((n-2)*(m-2))

Submission status: Wrong Answer

Solution code:
a, b = list(map(str, input().split()))
list_a = []
list_b = []
for i in range(5):
    list_a.append(int(a[i]))
    list_b.append(int(b[i]))
aa = list_a[0] * 10 + list_a[1]
bb = list_b[0] * 10 + list_b[1]

if aa == bb:
    if aa <= list_a[3] * 10 + list_a[4]:
        f = list_a[2] + 1
    else:
        f = list_a[2]
    if bb <= list_b[3] * 10 + list_b[4]:
        l = list_b[2]
    else:
        l = list_b[2] - 1
    print(l - f + 1)
else:
    ans = 0
    ans += 10 * (bb - aa - 1)

    if list_a[0] + list_a[1] * 10 <= list_a[3] * 10 + list_a[4]:
        ans += 9 - list_a[2]
    else:
        ans += 9 - list_a[2] + 1
    if list_b[0] + list_b[1] * 10 <= list_b[3] * 10 + list_b[4]:
        ans += list_b[2] + 1
    else:
        ans += list_b[2]
    print(ans)

Submission status: Wrong Answer

Solution code:
a, b = list(map(str, input().split()))
list_a = []
list_b = []
for i in range(5):
    list_a.append(int(a[i]))
    list_b.append(int(b[i]))
aa = list_a[0] * 10 + list_a[1]
bb = list_b[0] * 10 + list_b[1]

if aa == bb:
    if aa <= list_a[3] * 10 + list_a[4]:
        f = list_a[2] + 1
    else:
        f = list_a[2]
    if bb <= list_b[3] * 10 + list_b[4]:
        l = list_b[2]
    else:
        l = list_b[2] - 1
    print(l - f + 1)
else:
    ans = 0
    ans += 10 * (bb - aa - 1)

    if list_a[0] + list_a[1] * 10 <= list_a[3] * 10 + list_a[4]:
        ans += 9 - list_a[2]
    else:
        ans += 9 - list_a[2] + 1
        print(1)
    if list_b[0] + list_b[1] * 10 <= list_b[3] * 10 + list_b[4]:
        ans += list_b[2] + 1
    else:
        ans += list_b[2]
        print(2)
    print(ans)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
ans = 0
for i in range(a, b+1):
    x = i % 100
    y = i // 1000
    if x == y:
        ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    A, B = map(int, input().split())
    result = 0
    for i in range(A, B + 1):
        i = str(i)
        mid = len(i) // 2
        if i[:mid] == i[mid + 1:]:
            result += 1
    print(result)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
ans = 0
for i in range(A, B + 1):
    sita = i % 100
    ue = i // 1000
    if sita == ue:
        ans += 1
print(ans)

Submission status: Wrong Answer

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

ans=0

for i in range(a,b+1):
    buf=str(i)
    #print(buf[0:int(len(buf)/2)],buf[int(len(buf)/2+1):])
    if buf[0:int(len(buf)/2)]==buf[int(len(buf)/2+1):]:
        ans+=1

print(ans)

Submission status: Wrong Answer

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

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

print(count)

Submission status: Wrong Answer

Solution code:
def Is_cyc(x):
  s = str(x)
  for i in range(len(s)):
    if s[i] != s[-i-1]:
      return False
  return True

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
#coding:utf-8
a, b = map(int, input().split())
count = 0

for i in range(a, b+1):
    num = str(i)
    if int(num[0:2]) == int(num[3:5]):
        count += 1

print(count)

Submission status: Wrong Answer

Solution code:
#coding:utf-8
a, b = map(int, input().split())
count = 0

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

print(count)

Submission status: Wrong Answer

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


def f(n):
    result = 0
    for i in range(10000, n + 1):
        t = str(i)
        if t[:len(t)//2] == t[-(len(t)//2):]:
            result += 1
    return result


print(f(B) - f(A - 1))

Submission status: Wrong Answer

Solution code:

A, B = map(int, input().split())
mid, count = 2, 0
x = []

for i in range(A, B+1):
    while(i > 10):
        x.append(i % 10)
        i = int(i/10)
    count = count+1 if(x[0:mid] == x[mid:len(x)] and len(x) > 0) else count
    x.clear()
print(count)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
mid, count = 2, 0
x = []

for i in range(A, B):
    while(i > 10):
        x.append(i % 10)
        i = int(i/10)
    count = count+1 if(x[0:mid] == x[mid:len(x)] and len(x) > 0) else count
    x.clear()
print(count)

Submission status: Wrong Answer

Solution code:
def is_palindromic(num: str):
    d = len(num) // 2
    front = num[:d]
    back = num[len(num)-d:]
    reversed_back = back[::-1]
    if front == back:
        return True
    else:
        return False


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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
ans = 0
for i in range(a,b+1):
  s = list(str(i))
  left = s[0:2]
  right = s[3:]
  if left == right:
    ans += 1
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
AB=list(map(int,input().split()))
A=AB[0]
B=AB[1]
cnt=0

for i in range(A,B):
    i=list(str(i))
    j=list(reversed(i))
    if i==j:
        cnt=cnt+1

print(cnt)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
no_count = 0 
if int(str(a // 1000)[::-1]) < a % 100:
        no_count -= 1
if int(str(b // 1000)[::-1]) > a % 100:
        no_count -= 1
print(b // 100 - a // 100 + 1 + no_count)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
no_count = 0 
if int(str(a % 1000)[::-1]) < a % 100:
        no_count -= 1
if int(str(b % 1000)[::-1]) > a % 100:
        no_count -= 1
print(b // 100 - a // 100 + 1 + no_count)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
no_count = 0 
if (a // 1000) < (a % 100):
        no_count -= 1
if (b // 1000) >  (b % 100):
        no_count -= 1
print(b // 100 - a // 100 + 1 + no_count)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
no_count = 0 
if a // 1000 < a % 100:
        no_count -= 1
if b // 1000 >  b % 100:
        no_count -= 1
print(b // 100 - a // 100 + 1 + no_count)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
ans = []
for i in range(b-a):
    num = list(map(str, str(a + i)))
    if num[0] == num[4] and num[1] == num[3]:
        ans.append(int("".join(num)))
print(len(ans))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

ans = 0

for i in range(a,b+1):
	
	k = len(str(i+1))

	if k%2 == 0:
		s = str(i)
		s1 = s[:k//2]
		s2 = s[k//2:]
		#文字列を逆順に並び替え
		s3 = s2[::-1]
		#print(s1)
		#print(s2)
		if s1==s3:
			ans = ans + 1
		
	else:
		s = str(i)
		s1 = s[:k//2]
		s2 = s[k//2+1:]
		s3 = s2[::-1]
		#print(s1)
		#print(s2)
		if s1==s3:
			ans = ans + 1

print(ans)

Submission status: Wrong Answer

Solution code:
import math
a, b = input().split()
n = (int(b[0]+b[1]+b[2]) - int(a[0]+a[1]+a[2]))
if int(a[1]+a[0])>int(a[3]+a[4]):
    n+=1
if int(b[1]+b[0])>int(b[3]+b[4]):
    n-=1
print(n)

Submission status: Wrong Answer

Solution code:
import math
a, b = input().split()
#11009 11332 -> 11x11 Fixed
#11009 13332 -> 11x11 or 12x21 or 13x31
#11009 22332 -> 11x11 or 12x21 or 13x31 or 14x41 ... 22x22
n = (int(b[0]+b[1]+b[2]) - int(a[0]+a[1]+a[2]))
n = n+1 if int(a[0]+a[1])>int(a[3]+a[4]) else n
print(n)

Submission status: Wrong Answer

Solution code:
number = []
number = input().split()

start_number = int(number[0])
end_number = int(number[1])
count = 0

while start_number < end_number:
    l = []
    for s in str(start_number):
        l.append(s)
    if l[0] == l[4] and l[1] == l[3]:
        count += 1
    start_number += 1

print(count)

Submission status: Wrong Answer

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

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

print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
result=0
for i in range(a,b):
  c=i
  d=list(str(i))
  d.reverse()
  if d==list(str(i)):
    result +=1
print(result)

Submission status: Wrong Answer

Solution code:
m,n=map(int,input().split())
for i in range(m,n+1):
    c=int(i/10000)
    d=int(i/1000%10)
    e=int(i/100%10)
    f=int(i/10%10)
    g=int(i%10)
    if((c+d*10+e*100+f*1000+g*10000)==i):
        print("%d"% i,end=" ")

Submission status: Wrong Answer

Solution code:
for i in range(1,pow(10,5)):
    b=int(i/100000)
    c=int(i/10000%10)
    d=int(i/1000%10)
    e=int(i/100%10)
    f=int(i/10%10)
    g=int(i%10)
    if((b**5+c**5+d**5+e**5+f**5+g**5)==i):
        print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

c = 0

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

print(c)

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':

	f,t = list(map(int,input().split()))

	cnt = 0
	for s in range(f,t):
		if str(s) == str(s)[::-1]:
			cnt  += 1

	print(cnt)

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
count=0
for i in range(A,B):
  o=str(i)
  l="".join(list(reversed(o)))
  if o==l:
    count+=1
print(count)

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
if A == 1 and B == 1:
  print(1)
elif A == 1 and B!= 1:
  print(B-2)
else:
  print((A-2)*(B-2))

Submission status: Wrong Answer

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


#i = int(one)

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

    i = int(i) + 1

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

total = 0
for i in range(A,B):
  if i >= A and i <= B:
    frontDigit = str(i)[:int(len(str(i))/2)]
    backDigit = str(i)[-int(len(str(i))/2):]
    if frontDigit == "".join(reversed(backDigit)):
      total += 1
print(total)

Submission status: Wrong Answer

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

total = 0
for i in range(A,B):
  frontDigit = str(i)[:int(len(str(i))/2)]
  backDigit = str(i)[int(len(str(i))/2) + 1:]
  if frontDigit == backDigit:
    total += 1
print(total)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# B - Palindromic Numbers
A,B = list(map(int, input().split()))
count = 0
for i in range(A,B):
    C = str(i)
    if C[0] == C[4] and C[1] == C[3]:
        count += 1
    else:
        pass
print(count)

Submission status: Wrong Answer

Solution code:
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]+'0'+'0')
#print(aa)
zz =int(z[0]+z[1]+z[2]+'0'+'0')
#print(zz)
#gapa = (int(Z)-int(A))//100+1
gapb = (zz-aa)//100+1
cnt = 0
if aa<int(A):
    #print('A')
    cnt-=1
if zz>int(Z):
    #print('Z')
    cnt-=1
#print(gapa)
print(gapb+cnt)
#print(cnt)
#print(gap+cnt)

Submission status: Wrong Answer

Solution code:
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]+a[1]+a[0])
#print(aa)
zz =int(z[0]+z[1]+z[2]+z[1]+z[0])
#print(zz)
gap = (int(Z)-int(A))//100+1
cnt = 0
if aa<int(A):
    #print('A')
    cnt-=1
if zz>int(Z):
    #print('Z')
    cnt-=1
#print(cnt)
print(gap+cnt)

Submission status: Wrong Answer

Solution code:
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]+a[1]+a[0])
#print(aa)
zz =int(z[0]+z[1]+z[2]+z[1]+z[0])
#print(zz)
gap = (int(Z)-int(Z))//100+1
cnt = 0
if aa<int(A):
    #print('A')
    cnt-=1
if zz>int(Z):
    #print('Z')
    cnt-=1
#print(cnt)
print(gap+cnt)

Submission status: Wrong Answer

Solution code:
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]+a[1]+a[0])
zz =int(z[0]+z[1]+z[2]+z[1]+z[0])
gap = (zz-aa)//100+1
cnt = 0
if aa<int(A):
    #print('min')
    cnt-=1
if zz>int(Z):
    #print('max')
    cnt-=1
#print(cnt)
print(gap+cnt)

Submission status: Wrong Answer

Solution code:
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]+a[0]+a[1])
zz =int(z[0]+z[1]+z[2]+z[0]+z[1])
gap = (int(Z)-int(A))//100+1
cnt = 0
if aa<int(A):
    cnt-=1
if zz>int(Z):
    cnt-=1
print(gap+cnt)

Submission status: Wrong Answer

Solution code:
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]+a[0]+a[1])
zz =int(z[0]+z[1]+z[2]+z[0]+z[1])
gap = (zz-aa)//100+1
cnt = 0
if aa<=int(A):
    cnt-=1
if zz>=int(Z):
    cnt-=1
print(gap+cnt)

Submission status: Wrong Answer

Solution code:
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]+a[0]+a[1])
zz =int(z[0]+z[1]+z[2]+z[0]+z[1])
gap = (zz-aa)//100+1
cnt = 0
#if aa<int(A):
#    cnt-=1
#if zz>int(Z):
#    cnt-=1
print(gap+cnt)

Submission status: Wrong Answer

Solution code:
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]+a[0]+a[1])
zz =int(z[0]+z[1]+z[2]+z[0]+z[1])
gap = (zz-aa)//100+1
cnt = 0
if aa<int(A):
    cnt-=1
if zz>int(Z):
    cnt-=1
print(gap+cnt)

Submission status: Wrong Answer

Solution code:
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]+a[0]+a[1])
zz =int(z[0]+z[1]+z[2]+z[0]+z[1])
gap = (zz-aa)//100+1
cnt = 0
if aa<int(A):
    cnt-=1
if zz>int(Z):
    cnt-=1
print(gap+cnt)

Submission status: Wrong Answer

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


def kaibun(x):

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

    else:
        front = x[:half][::-1]
        back = x[half:]

    if front == back and front[0] != "0" and back[0] != "0":
        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)

Submission status: Wrong Answer

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


def kaibun(x):

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

    else:
        front = x[:half][::-1]
        back = x[half:]

    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)