add: swea/10570.py

This commit is contained in:
Gyubin Han
2024-05-08 18:19:19 +09:00
parent b13d2171c8
commit 8094117173

25
swea/10570.py Normal file
View File

@@ -0,0 +1,25 @@
t=int(input())
for tc in range(1,t+1):
a,b=map(int,input().split())
count=0
for i in range(a,b+1):
v=i**(1/2)
if v==int(v):
isPal=True
si=str(i)
for j in range(len(si)//2):
if not si[j]==si[-j-1]:
isPal=False
break
vs=str(int(v))
for j in range(len(vs)//2):
if not vs[j]==vs[-j-1]:
isPal=False
break
if isPal:
count+=1
print("#"+str(tc),count)