From 967f829d4805936633b43097a0b630a22cfe30c2 Mon Sep 17 00:00:00 2001 From: Gyubin Han <89185979+Gyubin-Han@users.noreply.github.com> Date: Wed, 1 May 2024 00:27:13 +0900 Subject: [PATCH] add: swea/1989.py --- swea/1989.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 swea/1989.py diff --git a/swea/1989.py b/swea/1989.py new file mode 100644 index 0000000..f9b0100 --- /dev/null +++ b/swea/1989.py @@ -0,0 +1,15 @@ +t=int(input()) + +for i in range(1,t+1): + s=input() + + rFlag=True + for j in range(len(s)//2): + if not s[j]==s[-j-1]: + rFlag=False + break + + if rFlag: + print("#"+str(i),1) + else: + print("#"+str(i),0)