From 80941171734ab6ab4e35ae2eb9e5b779c60e6cc9 Mon Sep 17 00:00:00 2001 From: Gyubin Han <89185979+Gyubin-Han@users.noreply.github.com> Date: Wed, 8 May 2024 18:19:19 +0900 Subject: [PATCH] add: swea/10570.py --- swea/10570.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 swea/10570.py diff --git a/swea/10570.py b/swea/10570.py new file mode 100644 index 0000000..8f4c812 --- /dev/null +++ b/swea/10570.py @@ -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) +