Problem:


Score : 200 points

Problem Statement

A string S of an odd length is said to be a strong palindrome if and only if all of the following conditions are satisfied:

S is a palindrome.

Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome.

The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome.

Determine whether S is a strong palindrome.

Constraints

S consists of lowercase English letters.

The length of S is an odd number between 3 and 99 (inclusive).

Input

Input is given from Standard Input in the following format:

S

Output

If S is a strong palindrome, print Yes;
otherwise, print No.

Sample Input 1

akasaka

Sample Output 1

Yes

S is akasaka.

The string formed by the 1-st through the 3-rd characters is aka.

The string formed by the 5-th through the 7-th characters is aka.
All of these are palindromes, so S is a strong palindrome.

Sample Input 2

level

Sample Output 2

No

Sample Input 3

atcoder

Sample Output 3

No



Sample input:
akasaka


Sample output:
Yes

Submission status: Wrong Answer

Solution code:
S=input()
N=len(S)
M=int((N-1)/2)
L=int((N+3)/2)
def kaibun(x):
    n=len(x)
    m=n//2
    if x[:m]==x[m+1:][::-1]:
        return True
    else:
        return False
if all([kaibun(S),kaibun(S[:M]),kaibun(S[L-1:])]):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S=input()
N=len(S)
M=N//2
def kaibun(x):
    n=len(x)
    m=n//2
    if x[:m]==x[m+1:][::-1]:
        return True
    else:
        return False
if all([kaibun(S),kaibun(S[:M]),kaibun(S[M+1:])]):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S=input()
N=len(S)
M=N//2
def kaibun(x):
    n=len(x)
    m=n//2
    if x[:m]==x[m+1:][::-1]:
        return True
    else:
        return False
if all([kaibun(S),kaibun(S[:M])]):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()

s1 = s[:int((len(s))/2)]
s2 = s[int((len(s)+3)/2)-1:]

print(s1)
print(s2)
if s[::] == s[::-1] and s1 == s1[::-1] and s2 == s2[::-1]:
    print("Yes")
else:
	print("No")

Submission status: Wrong Answer

Solution code:
s = list(input())
if not s[::] == s[::-1]:
	print("No")
elif s[0:int((len(s)-1)/2)] == s[int(((len(s)+3)/2)-1):len(s)]:
	print("Yes")

Submission status: Wrong Answer

Solution code:
def palindrome(word):
  if len(word) <= 1:
    return True
  if word[0] != word[-1]:
    return False
  return palindrome(word[1:-1])
 
word = input().lower()
n = len(word) // 2
issuper = palindrome(word[:n]) and palindrome(word[n+1:])
print("Yes" if issuper else "No")

Submission status: Wrong Answer

Solution code:
def palindrome(word):
  if len(word) <= 1:
    return True
  if word[0] != word[-1]:
    return False
  return palindrome(word[1:-1])
 
word = input()
n = len(word) // 2
issuper = palindrome(word[:n]) and palindrome(word[n+1:])
print("Yes" if issuper else "No")

Submission status: Wrong Answer

Solution code:
s = input()
def kai(l):
  n = len(l)
  output = 'Yes'
  for i in range(n%2):
    if l[i] != l[n-i-1]:
      output = 'No'
  return output

ans = kai(s)
if ans == 'Yes':
  ans = kai(s[:len(s)%2])
if ans == 'Yes':
  ans = kai(s[len(s)%2+1:])
print(ans)

Submission status: Wrong Answer

Solution code:
s = input()
def kai(l):
  n = len(l)
  output = 'Yes'
  for i in range(n%2):
    if l[i] != l[n-i-1]:
      output = 'No'
  return output

ans = kai(s)
if ans == 'Yes':
  ans = kai(s[:len(s)%2])
print(ans)

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
output = 'Yes'
if n == 3:
  if s[:1] != s[2:]:
    output = 'No'
else:
  if s[:n%2] != s[n-n%2:]:
    output = 'No'
  else:
    if s[:n%4] != s[n-n%4:]:
      output = 'No'
print(output)

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
output = 'Yes'
if n == 3:
  if s[:1] != s[2:]:
    output = 'No'
else:
  if s[:n%2] != s[n%2+2:]:
    output = 'No'
  else:
    if s[:n%4] != s[n-n%4:]:
      output = 'No'
print(output)

Submission status: Wrong Answer

Solution code:
S =list(str(input()))
S1=S[0:int(((len(S)-1)/2))]
S2=S[int(((len(S)+3)/2)-1):len(S)+1]


if S1==list(reversed(S1)) and S2==list(reversed(S2)):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()
n = len(list(s))
p = s[:(n-1)//2]
t = s[(n+1)//2:]
p1 = [p[i] for i in reversed(range((n-1)//2))]
t1 = [t[i] for i in reversed(range((n-1)//2))]
flag = True
for i in range((n-1)//2):
    if p1[i] != p[i]:
        flag = False
        break
    if t1[i] != t[i]:
        flag = False
        break
if flag == True:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = list(input())
a = int((len(s) - 1)/2)
b = s[:a]
c = b[::-1]
if b == c:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
s = input()

def isPalindrome(a):
    i = 0
    j = len(a)-1
    while(i<j):
        if(a[i] != a[j]):
            return False
        i += 1
        j -= 1
    return True

n = len(s)
# print(s[:int((n-1)/2)])
# print(s[int((n+3)/2)-1:])
# print(isPalindrome(s[:int((n-1)/2)]))
print("Yes" if isPalindrome(s[:int((n-1)/2)]) and isPalindrome(s[int((n+3)/2)-1:]) else "No")

Submission status: Wrong Answer

Solution code:
n = list(input())
nr = list(reversed(n))
mae = []
usiro = []
for i in range(int((len(n)-1)/2)):
    mae.append(n[i])
    usiro.append(nr[i])

if mae == usiro:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
n = list(input())
nr = list(reversed(n))
mae = []
usiro = []
print((len(n)-1)/2)
for i in range(int((len(n)-1)/2)):
    mae.append(n[i])
    usiro.append(nr[i])

if mae == usiro:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import numpy as np
S = input()
N = len(S)
A = []
B = []
for i in range((N-1)//2):
    A.append(S[i])
for j in range((N-1)//2):
    B.append(S[((N+3)//2)+(j-1)])

C = list(reversed(A))
D = list(reversed(B))

if np.count_nonzero(np.array(A) == np.array(C)) == np.count_nonzero(np.array(B) == np.array(D)) == len(A):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
A = []
B = []
for i in range((N-1)//2):
    A.append(S[i])
for j in range((N-1)//2):
    B.append(S[((N+3)//2)+(j-1)])

C = list(reversed(A))
D = list(reversed(B))

if A == C and B == D:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
def main():
	# s = int(input())
	s = str(input())
	s_1_mae = list(s[:((len(s)-1) // 2)])

	s_2 = list(s[((len(s)+3)// 2) -1 :])

	if s_1_mae == list(reversed(s_1_mae)) and s_2 == list(reversed(s_2)) and list(s) == reversed(list(s)):
		print("Yes")
	else:
		print("No")

if __name__ == '__main__':
	main()

Submission status: Wrong Answer

Solution code:
def main():
	s = str(input())
	s_1_mae = list(s[:(len(s)-1) // 2])

	s_2 = list(s[((len(s)+3)// 2) -1 :])
	
	if s_1_mae == list(reversed(s_1_mae)) and s_2 == list(reversed(s_2)):
		print("Yes")
	else:
		print("No")

if __name__ == '__main__':
	main()

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)

ind1 = int((N-1)/2)
ind2 = int((N+3)/2)

if S[0] == S[ind1-1] and S[ind2-1] == S[N-1]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s=input()

def judge_palindrome(x):
	if x==x[::-1]:
		return True
	else:
		return False
#print(s[:int((len(s)-1)/2)])
#print(s[int((len(s)+3)/2)-1:])
if judge_palindrome(s) and judge_palindrome(s[:int((len(s)-1)/2)]) and judge_palindrome(s[int((len(s)+3)/2):]):
	print('Yes')
else:
	print('No')

Submission status: Wrong Answer

Solution code:
s=input()

def judge_palindrome(x):
	if x==x[::-1]:
		return True
	else:
		return False

if judge_palindrome(s) and judge_palindrome(s[:int((len(s)-1)/2)]) and judge_palindrome(s[int((len(s)+3)/2):]):
	print('Yes')
else:
	print('No')

Submission status: Wrong Answer

Solution code:
s=input()

def judge_palindrome(x):
	for i in range(len(x)//2):
		if x[i]!=x[-i-1]:
			return False
	return True

if judge_palindrome(s) and judge_palindrome(s[:int((len(s)-1)/2)]) and judge_palindrome(s[int((len(s)+3)/2):]):
	print('Yes')
else:
	print('No')

Submission status: Wrong Answer

Solution code:
s=input()

def judge_palindrome(x):
	
	flag=True
	if len(x)%2==0:
		flag=False
	for i in range(int((len(x)-1)/2)):
		if x[i]!=x[len(x)-1-i]:
			flag=False
	if flag:
		return True
	else:
		return False

if judge_palindrome(s) and judge_palindrome(s[:int((len(s)-1)/2)]) and judge_palindrome(s[int((len(s)+3)/2):]):
	print('Yes')
else:
	print('No')

Submission status: Wrong Answer

Solution code:
s=input()

def judge_palindrome(x):
	flag=True
	for i in range(int((len(x)-1)/2)):
		if x[i]!=x[len(x)-1-i]:
			flag=False
	if flag:
		return True
	else:
		return False

if judge_palindrome(s) and judge_palindrome(s[:int((len(s)-1)/2)]) and judge_palindrome(s[int((len(s)+3)/2):]):
	print('Yes')
else:
	print('No')

Submission status: Wrong Answer

Solution code:
s = input()
l = len(s)


def check_kaibun(kaibun):
    n = len(kaibun)
    middle = n // 2
    count = 0
    for i in range(middle):
        if kaibun[i] == kaibun[n - i - 1]:
            count += 1
        else:
            count = 0
            break
    if count == middle:
        return True
    else: 
        return False

left_center = (l-2) // 2
right_center = (l+2) // 2

check1 = check_kaibun(s[:left_center + 1])
check2 = check_kaibun(s[right_center:])

if (check1 == True) and (check2 == True): 
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import math
S=input()
N=len(S)


firstS=S[:math.ceil(N/2)-1]
secondS=S[int((N+3)/2-1):]

if firstS==firstS[::-1] and secondS==secondS[::-1]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S=input()
N=len(S)
ans='Yes'
if N==3:
    ans='No'
else:
    if int((N-1)/2)%2==1:
        for i in range((N-3)//4):
            if S[i] != S[((N-3)//2)-i] or S[((N+1)//2)+i] != S[N-i-1]:
                ans='No'
    else:
        for i in range((N-1)//4):
            if S[i] != S[((N-3)//2)-i] or S[((N+1)//2)+i] != S[N-i-1]:
                ans='No'
 
print(ans)

Submission status: Wrong Answer

Solution code:
S=input()
N=len(S)
ans='Yes'
if N==3:
    if S[0]!=S[2]:
        ans='No'
else:
    if int((N-1)/2)%2==1:
        for i in range((N-3)//4):
            if S[i] != S[((N-3)//2)-i] or S[((N+1)//2)+i] != S[N-i-1]:
                ans='No'
    else:
        for i in range((N-1)//4):
            if S[i] != S[((N-3)//2)-i] or S[((N+1)//2)+i] != S[N-i-1]:
                ans='No'
 
print(ans)

Submission status: Wrong Answer

Solution code:
S=input()
N=len(S)
ans='Yes'

if int((N-1)/2)%2==1:
    for i in range((N-3)//4):
        if S[i] != S[((N-3)//2)-i] or S[((N+1)//2)+i] != S[N-i-1]:
            ans='No'
else:
    for i in range((N-1)//4):
        if S[i]!=S[((N-3)//2)-i] or S[((N+1)//2)+i]!=S[N-i-1]:
            ans='No'

print(ans)

Submission status: Wrong Answer

Solution code:
S=input()
N=len(S)
ans='Yes'

if int((N-1)/2)%2==1:
    for i in range((N-3)//4):
        if S[i] != S[((N-3)//2)-i] or S[((N+1)//2)+i] != S[N-i-1]:
            ans='No'
else:
    for i in range((N-1)//4):
        if S[i]!=S[((N-3)//2)-i] or S[((N-1)//2)+i]!=S[N-i-1]:
            ans='No'

print(ans)

Submission status: Wrong Answer

Solution code:
s = input()
l = len(s)
s1 = s[:int((l-1)/2)]
s3 = s[int((l+1)/2):]
s4 = s3[::-1]

m = s[:int((l-1)/2)]
n = len(m)
m1 = m[:int((n-1)/2)]
m3 = m[int((n+1)/2):]
m4 = m3[::-1]

a = s[int((l+3)/2-1):]
b = len(a)
a1 = a[:int((b-1)/2)]
a3 = a[int((b+1)/2):]
a4 = a3[::-1]


if (s1 in s4) & (m1 in m4) & (a1 in a4):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()
l = len(s)
s1 = s[:int((l-1)/2)]
s2 = s1[::-1]
s3 = s[int((l+1)/2):]
s4 = s3[::-1]

m = s[:int((l-1)/2)]
n = len(m)
m1 = m[:int((n-1)/2)]
m2 = m1[::-1]
m3 = m[int((n+1)/2):]
m4 = m3[::-1]

a = s[int((l+3)/2-1):]
b = len(a)
a1 = a[:int((b-1)/2)]
a2 = a1[::-1]
a3 = a[int((b+1)/2):]
a4 = a3[::-1]


if (s2 in s4) & (m2 in m4) & (a2 in a4):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()
l = len(s)
s1 = s[:int((l-1)/2)]
s2 = s1[::-1]
s3 = s[int((l+1)/2):]
s4 = s3[::-1]

m = s[:int((l-1)/2)]
n = len(m)
m1 = m[:int((n-1)/2)]
m2 = m1[::-1]
m3 = m[int((n+1)/2):]
m4 = m3[::-1]

a = s[int((l+3)/2-1):]
b = len(a)
a1 = a[:int((b-1)/2)]
a2 = a1[::-1]
a3 = a[int((b+1)/2):]
a4 = a3[::-1]

print(s, s1, s2, s3, s4)
print(m, m1, m2, m3, m4)
print(a, a1, a2, a3, a4)

if (s2 in s4) & (m2 in m4) & (a2 in a4):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = input()

length = len(S)
is_strong_palindrome = True
first_half_S = S[:length//2]
second_half_S = S[length//2+1:]
# print(first_half_S)
# print(second_half_S)

length_palindrome = len(first_half_S)
for i in range(length_palindrome//2):
    if first_half_S[i] != first_half_S[length_palindrome-i-1]:
        is_strong_palindrome = False
        break
    if second_half_S[i] != second_half_S[length_palindrome-i-1]:
        is_strong_palindrome = False
        break

if is_strong_palindrome:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
if S[:(N-1)//2] == S[:(-(N-1)//2)-1:-1]:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
if S[:(N-1)//2] == S[N-((N-1)//2)::-1]:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
S = str(input())

N = len(S)
palinBool = "No"

if S[:((N-1)//2)] == S[((N-1)//2)-1::-1] and S[((N+3)//2)-1:] == S[N-1:((N+3)//2)-2:-1]:
	palinBool = "Yes"

print(palinBool)

Submission status: Wrong Answer

Solution code:
S = str(input())

N = len(S)
palinBool = "No"

if S[:((N-1)//2)] == S[N:((N-1)//2):-1]: 
	palinBool = "Yes"

print(palinBool)

Submission status: Wrong Answer

Solution code:
def reverse(x):
  if x[::-1]==x:
    return True
  else:
    return False

def main(s):
  l=len(s)//2
  x1=s[:l]
  x2=s[l+1:]
  if reverse(x1) and reverse(x2):
    print("Yes")
  else:
    print("No")
    
if __name__=='__main__':
  main(input())

Submission status: Wrong Answer

Solution code:
s=input()
n=len(s)
s1=s[(n-1)//2]
flag=0
for i in range(len(s1)//2):
    if(s1[i]!=s1[-1-i]):
        flag=1
        break

s1=s[(n+3)//2-1]
for i in range(len(s1)//2):
    if(s1[i]!=s1[-1-i]):
        flag=1
        break

for i in range(n//2):
    if s[i]!=s[-1-i]:
        flag=1
        break

if flag==1:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
s = str(input())
n = int(len(s))
if ((n+1)/2)%2 != 0:
  if (s[i-1] == s[n-i] for i in range(1,int((n+1)/2))) and (s[j-1] == s[int(((n-1)/2)-j)] for j in range(1,int((n+3)/4))) and (s[int((n+2*k-1)/2)] == s[n-k] for k in range(1,int((n+3)/4))):
    print('Yes')
  else:
    print('No')
else:
  if (s[i-1] == s[n-i] for i in range(1,int((n+1)/2))) and (s[j-1] == s[int((n-2*j-1)/2)] for j in range(1,int((n+1)/4))) and (s[int((n+2*k-1)/2)] == s[n-k] for k in range(1,int((n+1)/4))):
    print('Yes')
  else:
    print('No')

Submission status: Wrong Answer

Solution code:
s=input()
n=len(s)
s1=s[:(n-1)//2]
flag=0
for i in range(len(s1)):
  if (s1[i]!=s1[-1-i]):
    flag=1
    break

#print(s1,flag)

s1=s[(n+3)//2-1:]
for i in range(len(s1)):
  if (s1[i]!=s1[-1-i]):
    flag=1
    break

#print(s1,flag)
if flag==1:
  print("No")
else:
  print("Yes")

Submission status: Wrong Answer

Solution code:

#ライブラリインポート
from collections import defaultdict

con = 10 ** 9 + 7
#入力受け取り
def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	S = input()
	N = len(S)
	judge = "Yes"
	s = int((N - 3) // 2)
	t = int((N + 1) // 2)
	for i in range(int((N - 1) // 2)):
		if S[i] != S[s - i]:
			judge = "No"
		if S[t + i] != S[N - 1 - i]:
			judge = "No"

	print(judge)

if __name__ == '__main__':
	main()

Submission status: Wrong Answer

Solution code:
s = input()

flag = True
n = len(s)
for i in range(n//4):
  if s[i] == s[(n-1)//2 -1 - i] == s[(n+3)//2 -1 + i] == s[n-1 - i]:
    if (n//2) % 2 == 1:
      if s[n//4] != s[n-1 - n//4]:
        break
      else:
        continue
    else:
      continue
  else:
    flag = False
    break

if flag == True:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
s = input()

flag = True
n = len(s)
for i in range(n//4):
  if s[i] == s[(n-1)//2 -1 - i] == s[(n+3)//2 -1 + i] == s[n-1 - i]:
    continue
  else:
    flag = False
    break

if flag == True:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
s = input()

flag = True
n = len(s)
for i in range(n//4):
  if s[i] == s[(n-1)//2 -1 - i] == s[(n+3)//2 -1 + i] == s[n-1 - i]:
    break
  else:
    flag = False

if flag == True:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
flg = True
for i in range((n + 1) // 4):
    if s[i] != s[n // 2 - 1 - i]:
        flg = False
        break
    if s[(n + 3) // 2 - 1 + i] != s[n - 1 - i]:
        flg = False
        break

if flg:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
flg = True
for i in range((n + 1) // 4):
    if s[i] != s[(n - 1) // 2 - 1 - i]:
        flg = False
        break
    if s[(n + 3) // 2 - 1 + i] != s[n - 1 - i]:
        flg = False
        break

if flg:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = input()
s = len(S)
L = []
A = ""
for i in S[0:int((s-1)/2)]:
    L.append(i)
    A += i
    
A = A[::-1]
#print(A)

B = ""
for i in S[int((s+1)/2):]:
    B += i
    
B = B[::-1]
#print(B)

if A == S[0:int((s-1)/2)] and B == S[int((s+1)/2):]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
my_string = input("Type your word: ")
my_string = my_string.casefold()
if ((len(my_string)) < 3 or (len(my_string)) > 100):
    #print(len(my_string))
    print("no")
    quit()

reversed_string = reversed(my_string)

n = len(my_string)
#defining string [0:(n-1)/2]
first_chars = my_string[:int((n-1)/2)]
reversed_first_chars = reversed(first_chars)

#defining string [((n+3)/2):n-1]
last_chars = my_string[int((n+3)/2)-1:]
reversed_last_chars = reversed(last_chars)
#print(type(first_chars), first_chars)
#print(last_chars)
#print(n)

#checking if S is a palindrome
if list(my_string) == list(reversed_string):
    #checking if it is a strong palindrome
    if (list(first_chars) == list(reversed_first_chars)):
        if (list(last_chars) == list(reversed_last_chars)):
            print("Yes")
        else:
            print("No")
    else:
        print("No")
#if it is not a palindrome at all
else:
    print("No")

Submission status: Wrong Answer

Solution code:
my_string = input("Type your word: ")
my_string = my_string.casefold()
if ((len(my_string)) < 3 or (len(my_string)) > 100):
    #print(len(my_string))
    print("no")
    quit()

reversed_string = reversed(my_string)

n = len(my_string)
#defining string [0:(n-1)/2]
first_chars = my_string[:int((n-1)/2)]
reversed_first_chars = reversed(first_chars)

#defining string [((n+3)/2):n-1]
last_chars = my_string[int((n+3)/2)-1:]
reversed_last_chars = reversed(last_chars)
#print(type(first_chars), first_chars)
#print(last_chars)
#print(n)

#checking if S is a palindrome
if list(my_string) == list(reversed_string):
    #checking if it is a strong palindrome
    if (list(first_chars) == list(reversed_first_chars)):
        if (list(last_chars) == list(reversed_last_chars)):
            print("yes")
        else:
            print("no")
    else:
        print("no")
#if it is not a palindrome at all
else:
    print("no")

Submission status: Wrong Answer

Solution code:
my_string = input("Type your word: ")
my_string = my_string.casefold()
reversed_string = reversed(my_string)

n = len(my_string)
#defining string [0:(n-1)/2]
first_chars = my_string[:int((n-1)/2)]
reversed_first_chars = reversed(first_chars)

#defining string [((n+3)/2):n-1]
last_chars = my_string[int((n+3)/2)-1:]
reversed_last_chars = reversed(last_chars)
#print(type(first_chars), first_chars)
#print(last_chars)
#print(n)

#checking if S is a palindrome
if list(my_string) == list(reversed_string):
    #checking if it is a strong palindrome
    if (list(first_chars) == list(reversed_first_chars)):
        if (list(last_chars) == list(reversed_last_chars)):
            print("yes")
        else:
            print("no")
    else:
        print("no")
#if it is not a palindrome at all
else:
    print("no")

Submission status: Wrong Answer

Solution code:
import math
S=input()
N=len(S)
K=math.floor((N-1)/2)
R=math.floor((N+3)/2)
if S[0]==S[K-1] and S[R-1]==S[N-1]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = input()
l = len(S)
i = 0

if S[:int((l-1)/2)] == S[int((l+1)/2)]:
    while i < (l-1)/2:
        if S[i] != S[-i-1]:
            print('No')
            break
        i = i + 1
    else:
        print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S = input()
l = len(S)
i = 0
while i < (l-1)/2:
    if S[i] != S[-i-1]:
        print('No')
        break
    i = i + 1
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
S = input()
l = len(S)

front = S[:int((l - 1) / 2)]
foward = S[int((l + 1) / 2):]

if front == foward:
    if len(front) % 2 == 0:
        if front[:int(len(front) / 2)] == front[int(len(front) / 2):]:
            print('Yes')
        else:
            print('No')
    elif len(front) == 1:
        print('Yes')
    else:
        if front[:int((len(front) - 1) / 2)] == front[int((len(front) + 1) / 2):]:
            print('Yes')
        else:
            print('No')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
##======================================python3
import sys
import collections
sys.setrecursionlimit(10**6)
input = sys.stdin.readline

class Run:
    def build(gv):
        gv.s = input()
    
    def string_reverse_chk(gv, s:str):
        rev_s = ''.join(reversed(s))
        if s == rev_s:
            return True
        return False
    
    def solve(gv):
        
        ans = "No"
        
        while True:
            reversed_s = "".join(reversed(gv.s))
            slen = len(gv.s)
            
            if gv.string_reverse_chk(gv.s) is False : break
        
            if gv.string_reverse_chk(gv.s[0:int((slen -1)/2)]) is False : break
            if gv.string_reverse_chk(reversed_s[0:int((slen -1)/2)]) is False : break
        
            if gv.string_reverse_chk(gv.s[int((slen +3)/2 -1):slen]) is False : break
            if gv.string_reverse_chk(reversed_s[int((slen +3)/2 -1):slen]) is False : break
            
            
            ans = 'Yes'
            break
        
        print(ans)
        
if __name__ == '__main__':
    run = Run()
    run.build()
    run.solve()

Submission status: Wrong Answer

Solution code:
##======================================python3
import sys
import collections
sys.setrecursionlimit(10**6)
input = sys.stdin.readline

class Run:
    def build(gv):
        gv.s = input()
    
    def string_reverse_chk(gv, s:str):
        rev_s = ''.join(reversed(s))
        if s == rev_s:
            return True
        return False
    
    def solve(gv):
        
        ans = "No"
        
        while True:
            reversed_s = "".join(reversed(gv.s))
            slen = len(gv.s)
            
            if gv.string_reverse_chk(gv.s) is False : break
        
            if gv.string_reverse_chk(gv.s[0:int((slen -1)/2)]) is False : break
            if gv.string_reverse_chk(reversed_s[0:int((slen -1)/2)]) is False : break
        
            if gv.string_reverse_chk(gv.s[int((slen +3)/2 -1):slen]) is False : break
            if gv.string_reverse_chk(reversed_s[int((slen +3)/2 -1):slen]) is False : break
            
            
            ans = "Yes"
            break
        
        print(ans)
        
if __name__ == '__main__':
    run = Run()
    run.build()
    run.solve()

Submission status: Wrong Answer

Solution code:
##======================================python3
import sys
import collections
sys.setrecursionlimit(10**6)
input = sys.stdin.readline

class Run:
    def build(gv):
        gv.s = input()
    
    def string_reverse_chk(gv, s:str):
        rev_s = ''.join(reversed(s))
        pass
    
    def solve(gv):
        pass
        
if __name__ == '__main__':
    run = Run()
    run.build()
    run.solve()

Submission status: Wrong Answer

Solution code:
##======================================python3
import sys
import collections
sys.setrecursionlimit(10**6)
input = sys.stdin.readline

class Run:
    def build(gv):
        gv.s = input()
    
    
    
    def solve(gv):
        pass
        
if __name__ == '__main__':
    run = Run()
    run.build()
    run.solve()

Submission status: Wrong Answer

Solution code:
S = list(input())
N = len(S)
j = 0 


#条件1
for i in range(N//2):
  if S[i] == S[-(i+1)]:
    continue
    
  else:
    j -= 1
    break
  
#条件2
for j in range((N-1)//2//2):
  if S[j] == S[(-(N-1)//2)-1-1-j]:
    continue
        
  else:
    j -= 1
    break
        
 #条件3
for k in range((N-1)//2//2):
  if S[(N+3)//2+k-1] == S[-(k+1)]:
    continue
    
  else:
    j -= 1
    break  
    
    
if j == 0:
  print('Yes')
  
else:
  print('No')

Submission status: Wrong Answer

Solution code:
S = list(input())
N = len(S)
j = 0 


#条件1
for i in range(N//2):
  if S[i] == S[-(i+1)]:
    continue
    
  else:
    j -= 1
    break
  
#条件2
for j in range((N-1)//2//2):
  if S[j] == S[((N-1)//2)-1-j]:
    continue
        
  else:
    j -= 1
    break
        
 #条件3
for k in range((N-1)//2//2):
  if S[(N+3)//2+k-1] == S[-(k+1)]:
    continue
    
  else:
    j -= 1
    break  
    
    
if j == 0:
  print('Yes')
  
else:
  print('No')

Submission status: Wrong Answer

Solution code:
S = list(input())
N = len(S)
j = 0 


#条件1
for i in range(N//2):
  if S[i] == S[N-1-i]:
    continue
    
  else:
    j -= 1
    break
  
#条件2
for j in range((N-1)//2//2):
  if S[j] == S[((N-1)//2)-1-j]:
    continue
        
  else:
    j -= 1
    break
        
 #条件3
for k in range((N-((N+3)//2-1))//2):
  if S[(N+3)//2+k-1] == S[-(k+1)]:
    continue
    
  else:
    j -= 1
    break  
    
    
if j == 0:
  print('Yes')
  
else:
  print('No')

Submission status: Wrong Answer

Solution code:
s = input()
print('Yes' if s[0:3] == s[-3:] and s[0:3].count(s[0:1]) < 3 else 'No')

Submission status: Wrong Answer

Solution code:
s = input()
print('Yes' if s[0:3] == s[-3:] and len(s) > 5 else 'No')

Submission status: Wrong Answer

Solution code:
s = input()
print('Yes' if s[0:3] == s[-3:] else 'No')

Submission status: Wrong Answer

Solution code:
s = input()
n= len(s)

tmp1 =s[:int((n-1)/2)]
tmp2 =s[int((n+3)/2)-1:]

flg = True

for i in range(0, int(len(tmp1)/2)):
    if tmp1[i] != tmp1[len(tmp1)-1-i]:
        flg = False


for i in range(0, int(len(tmp2)/2)):
    if tmp2[i] != tmp2[len(tmp2)-1-i]:
        flg = False

if flg:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
s1 = s[:(n - 1) // 2]
s2 = s[(n + 2) // 2:]
print(s == s[::-1] and s1 == s1[::-1] and s2 == s2[::-1])

Submission status: Wrong Answer

Solution code:
S = input();
N = len(S);

central_num = int((N - 1) / 2);

rev = S[::-1]

#前
mae = rev[central_num + 1:]

#後
usiro = rev[:central_num];

if S[0:central_num] == mae and S[central_num+1:N] == usiro:
  print("Yes");
else:
  print("No");

Submission status: Wrong Answer

Solution code:
S = input();
N = len(S);

central_num = int((N - 1) / 2);

mae = str();
usiro = str();

#前
for i in range(central_num):
  mae += S[central_num - 1 - i];

for j in range(central_num):
  usiro += S[N - 1 - j];

if S[0:central_num] == mae and S[central_num+1:N] == usiro:
  print("Yes");
else:
  print("No");

Submission status: Wrong Answer

Solution code:
S = input();
N = len(S);

central_num = int((N - 1) / 2);

mae = [];
usiro = [];

#前
for i in range(central_num):
  mae.append(S[central_num - 1 - i]);

for j in range(central_num):
  usiro.append(S[N - 1 - j]);

mae = "".join(mae);
usiro = "".join(usiro);

if S[0:central_num] == mae and S[central_num+1:N] == usiro:
  print("Yes");
else:
  print("No");

Submission status: Wrong Answer

Solution code:
S = input();
N = len(S);

central_num = int((N - 1) / 2);

mae = [];
usiro = [];

#前
for i in range(central_num):
  mae.append(S[central_num - 1 - i]);

for j in range(central_num):
  usiro.append(S[N - 1 - j]);
  
if S[0:central_num] == mae and S[central_num+1:N] == usiro:
  print("Yes");
else:
  print("No");

Submission status: Wrong Answer

Solution code:
S = input();
N = len(S);

central_num = int((N - 1) / 2);

mae = [];
usiro = [];

#前
for i in range(central_num):
  mae.append(S[central_num - 1 - i]);

for j in range(central_num):
  usiro.append(N - 1 - j);
  
if S[0:central_num] == mae and S[central_num+1:N] == usiro:
  print("Yes");
else:
  print("No");

Submission status: Wrong Answer

Solution code:
s = list(input())
s_f = s[0: (len(s) - 1) // 2]
s_b = s[(len(s) + 3) // 2 - 1:len(s)]

if (s != s[::-1]) or (s_f != s_f[::-1]) or (s_b != s_b[::-1]):
    print('No')
else:
    print('Yes')

print(s_f, s_b)

Submission status: Wrong Answer

Solution code:
def check(string2):
	N = len(string2)
	rev = string2[::-1]
	for i in range((N//2)+1):
		if(rev[i]!=string2[i]):
			return False
	return True


string = input()
n = len(string)
n-=1
str1 = string[0:int((n)/2)]
# print(str1)
str2 = string[int((n)/2)+1:n+1]
# print(str2)
if check(str1) and check(str2):
	print("Yes")
else:
	print("No")

Submission status: Wrong Answer

Solution code:
def check(string2):
	N = len(string2)
	rev = string2[::-1]
	for i in range((N//2)+1):
		if(rev[i]!=string2[i]):
			return False
	return True


string = input()
n = len(string)
# n-=1
str1 = string[0:int((n-1)/2)]
# print(str1)
str2 = string[int((n+3)/2)-1:n]
# print(str2)
if check(str1) and check(str2):
	print("Yes")
else:
	print("No")

Submission status: Wrong Answer

Solution code:
def check(string2):
	N = len(string2)
	rev = string2[::-1]
	for i in range((N//2)+1):
		if(rev[i]!=string2[i]):
			return False
	return True


string = input()
n = len(string)
# n-=1
str1 = string[0:((n-1)//2)]
# print(str1)
str2 = string[((n+3)//2)-1:n]
# print(str2)
if check(str1) and check(str2):
	print("Yes")
else:
	print("No")

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
ans = "Yes"
if s != s[::-1]:
    ans = "No"
else:
    s_left = []
    s_right = []
    for i in range((n - 1) // 2):
        s_left.append(s[i])
    for i in range((n - 1) // 2 + 1, n):
        s_right.append(s[i])
    if len(s_left) % 2 == 0 or len(s_right) % 2 == 0:
        ans = "No"
    else:
        if s_left != s_left[::-1] or s_right != s_right[::-1]:
            ans = "No"
print(ans)

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)

def kaibun(S, N):
  if N == 1:
    return True
  if N%2 != 0:
    s1 = S[:(N-1)//2]
    s2 = S[(N+1)//2:]
  else:
    s1 = S[:N//2]
    s2 = S[N//2:]
  n = len(s1)
  if s1 == s2:
    return kaibun(s1, n)
  else:
    return False

if kaibun(S, N):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)

def kaibun(S, N):
  if N == 1:
    return True
  s1 = S[:(N-1)//2]
  s2 = S[(N+1)//2:]
  n = len(s1)
  if s1 == s2:
    return kaibun(s1, n)
  else:
    return False

if kaibun(S, N):
  print('Yes')
else:
  print('No')