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)
K = (N-3)//2
if S == S[::-1] and S[0:K] == S[0:K:-1]:
    print ('Yes')
else:
    print ('No')

Submission status: Wrong Answer

Solution code:
from collections import deque
s = input()
n = len(s)
kai = deque(s)
a = int((n-3)/2+1)
b = int((n+1)/2)

kai_a = deque(s[:a])
kai_b = deque(s[b:])

def f(kai):
    if len(kai) <= 2:
        return False
    while len(kai) >= 3:
        if kai.pop() == kai.popleft():
            continue
        else:
            return False
    return True

if f(kai) and f(kai_a) and f(kai_b):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

tmp1, tmp2 = [], []
flag = 0
for i in range(int((N-1)/2)):
  tmp1.append(S[i])
for i in range(int((N-1)/2)):
  tmp2.append(S[-1-i])
#print(tmp1, tmp2)
if tmp1 == tmp2:
  flag = 1
  
if flag == 1:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
S = input()

N = len(S)
ans = 'No'

for i in range(int((N + 1) / 2)):
    if S[i] == S[N - 1 - i]:
        ans = 'Yes'
    else:
        ans = 'No'

for i in range(int((N - 1) / 2 // 2 )):
    if S[i] == S[int((N - 1) / 2 - 1) - i]:
        ans = 'Yes'
    else:
        ans = 'No'

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

print(ans)

Submission status: Wrong Answer

Solution code:
s=list(input())
n=len(s)
ans="Yes"
if n==3:
  if s[0]!=s[2]:
    ans="No"
if n%4==1:
  for i in range((n-1)//4):
    if s[i]!=s[((n-1)//2)-1-i]:
      ans="No"
    if s[((n+3)//2)-1+i]!=s[n-1-i]:
      ans="No"
if n%4==3:
  for j in range((n-3)//4):
    if s[j]!=s[((n-1)//2)-1-j]:
      ans="No"
    if s[((n+3)//2)-1+j]!=s[n-1-j]:
      ans="No"
    if s[((n+1)//4)-1]!=s[(((3*n)+3)//4)-1]:
      ans="No"
print(ans)

Submission status: Wrong Answer

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

Flag1 = False
Flag2 = False
Flag3 = False

if S == S[::-1]:
    Flag1 = True

if S[:(N-1)//2] == S[:(N-1)//2:-1]:
    Flag2 = True

#print(S[(N+3)//2-1:],S[(N+3)//2-3::-1])
if S[(N+3)//2-1:] == S[(N+3)//2-1::-1]:
    Flag3 = True

if Flag1 and Flag2 and Flag3:
    print("Yes")
else:
    print("No")
#print(Flag1,Flag2,Flag3)

Submission status: Wrong Answer

Solution code:
s = input()

s_norm = list(s)
s_rev = reversed(s)
if s_norm == s_rev:
    s_len = len(s)
    second = (s_len -1)/2
    s_new = s_norm[0:second]
    s_new_rev = reversed(s_new)
    if s_new == s_new_rev:
        third = (s_len +3)/2
        s_last = s_norm[third:s_len+1]
        s_last_rev = reversed(s_new)
        if s_last == s_last_rev:
            print("Yes")
        else:
            print("No")
    else:
        print("No")
else:
    print("No")

Submission status: Wrong Answer

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

Flag1 = False
Flag2 = False
Flag3 = False

if S == S[::-1]:
    Flag1 = True

if S[:(N-1)//2] == S[:(N-1)//2:-1]:
    Flag2 = True

print(S[(N+3)//2-1:],S[(N+3)//2-3::-1])
if S[(N+3)//2-1:] == S[(N+3)//2-1::-1]:
    Flag3 = True

if Flag1 and Flag2 and Flag3:
    print("Yes")
else:
    print("No")
#print(Flag1,Flag2,Flag3)

Submission status: Wrong Answer

Solution code:

s = input()

def check(s):
  if(s==s[::-1]):
    return True
  else:
    return False
  
n = len(s)
if(check(s[:(n-1)//2])):
  if(check(s[((n+3)//2)-1:])):
     print('Yes')
  else:
    print('No')
else:
     print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = list(input())
N = len(S)
#全体が回文である条件
S1 = S[:(N-1)//2]
S2 = S[((N+3)//2)-1:]
S2.reverse()
#半分が回文である条件
S3 = S[:(N-3)//4]
S4 = S[(N+1)//4:(N-1)//2]
S4.reverse()

S5 = S[(N+1)//2:(3*N-1)//4]
S6 = S[(3*N+3)//4:]
S6.reverse()

if S1 ==S2 and S3 ==S4 and S5 == S6:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

ans = 'Yes'

if n == 3:
    if s[0] != s[2]:
        ans = 'No'
elif n-1 % 4 == 0:
    for i in range(int((n-1) / 4)):
        if s[i] != s[int((n-3) / 2 - i)]:
            ans = 'No'
            break
        elif s[int((n+1) / 2 + i)] != s[-(i+1)]:
            ans = 'No'
            break
else:
    for i in range(int((n-3)/4)):
        if s[i] != s[int((n-3) / 2 - i)]:
            ans = 'No'
            break
        elif s[int((n+1) / 2 + i)] != s[-(i+1)]:
            ans = 'No'
            break

print(ans)

Submission status: Wrong Answer

Solution code:
S=input()
N=len(S)
i=0
if((N-1)/2%2==1):
    while (i<((N-1)/2-1)/2):
        if( (S[i]==S[int((N-1)/2-i-1)]) & (S[i]==S[int((N-1)/2+1+i)]) & (S[i]==S[int(N-1-i)]) ):
            i+=1
        else:
            break;
    if(i==int(((N-1)/2-1)/2)):
        print('Yes')
    else:
        print('No')
    
else:
    while (i<(N-1)/4):
        if( (S[i]==S[int((N-1)/2-i-1)]) & (S[i]==S[int((N-1)/2+1+i)]) & (S[i]==S[int(N-1-i)]) ):
            i+=1
        else:
            break;
    if(i==int((N-1)/4)):
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

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

out = "Yes"
    
for i in range(int((N-1)/4)):
    if S[i] == S[int(N/2)-i-1]:
        pass
    elif S[i] != S[int(N/2)-i-1]:
        out = "No"
        break
    else:
        pass
        
    if S[int(N/2)+1+i] == S[-i-1]:
        pass
    elif S[int(N/2)+1+i] != S[-i-1]:
        out = "No"
        break
    else:
        pass
print(out)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
str = input()
list_str = list(str)

pal = "Yes"

for i in range(len(list_str) // 2):
  if list_str[i] != list_str[len(list_str) - 1 - i]:
    pal = "No"
    break

if pal == "Yes":
  str_half = []

  for i in range((len(list_str) // 2)):
    str_half.append(list_str[i])

  if len(str_half) <= 1:
    pal = "No"
  else:
    for i in range(len(str_half) // 2):
      if str_half[i] != list_str[len(str_half) - 1 - i]:
        pal = "No"
        break

  if pal == "Yes":
    str_any = []

    for i in range(((len(list_str) + 3) // 2) - 1, len(list_str)):
      str_any.append(list_str[i])

    if len(str_any) <= 1:
      pal = "No"
    else:
      for i in range(len(str_any) // 2):
        if str_any[i] != list_str[len(str_any) - 1 - i]:
          pal = "No"
          break

print(pal)

Submission status: Wrong Answer

Solution code:
s = str(input())
n = int(len(s))
if (s[::-1] != s) or (s[:(n-1)//2:] != s[:(n-1)//2:-1]) or (s[(n+3)//2::] != s[(n+3)//2::-1]):
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

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

Flag1 = False
Flag2 = False
Flag3 = False

if S == S[::-1]:
    Flag1 = True

if S[:(N-1)//2] == S[:(N-1)//2:-1]:
    Flag2 = True
    
if S[(N+3)//2-1:] == S[(N+3)//2-1::-1]:
    Flag3 = True

if Flag1 and Flag2 and Flag3:
    print("Yes")
else:
    print("No")
#print(Flag1,Flag2,Flag3)

Submission status: Wrong Answer

Solution code:
s = input()
flg = 0
n = len(s)
s1 = s[0:(n-1)//2]
s2 = s[(n+3)//2-1:]
t1 = s1[::-1]
t2 = s2[::-1]
#print(s1,s2,t1,t2)

for i in range(len(s1)):
  if s1[i] != t1[i] or s2[i] != t2[i]:
    flg = 1
    break
 
print("Yes" if flg == 0 else "No")

Submission status: Wrong Answer

Solution code:
word=list(input())
word_number=len(word)

if word_number>=7:
    if word_number%2==1:
        for i in range(int(word_number/2)):
            if word[i]==word[-i-1]:
                result='Yes'
                continue
            else:
                result='No'
                break

            result='Yes'
    else:
        result='No'
else:
    result='No'

print(result)

Submission status: Wrong Answer

Solution code:
S=input()
N=len(S)
i=0
if((N-1)/2%2==1):
    while (i<((N-1)/2-1)/2):
        if( (S[i]==S[int((N-1)/2-i-1)]) & (S[i]==S[int((N-1)/2+1+i)]) & (S[i]==S[int(N-1-i)]) ):
            i+=1
        else:
            break;
    if(i==int((N-1)/2-1/2)):
        print('Yes')
    else:
        print('No')
    
else:
    while (i<(N-1)/4):
        if( (S[i]==S[int((N-1)/2-i-1)]) & (S[i]==S[int((N-1)/2+1+i)]) & (S[i]==S[int(N-1-i)]) ):
            i+=1
        else:
            break;
    if(i==int((N-1)/4)):
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
S = list(input())
N = len(S)
flag = True
for i in range((N+1)//2-1):
    if S[i] != S[-1-i]:
        flag = False
if N%4 == 1:
    mae = S[:((N+1)//4+2)]
elif N%4 == 3:
    mae = S[:((N+1)//4+1)]
ato = S[(N+3)//2-1:]

N = len(mae)
if N%2 == 1:
    for i in range((N+1)//2-1):
        if mae[i] != mae[-1-i]:
            flag = False
    for i in range((N+1)//2-1):
        if ato[i] != ato[-1-i]:
            flag = False
else:
    for i in range((N+1)//2):
        if mae[i] != mae[-1-i]:
            flag = False
    for i in range((N+1)//2):
        if ato[i] != ato[-1-i]:
            flag = False

if flag == True:
    print('Yes')
elif flag == False:
    print('No')

Submission status: Wrong Answer

Solution code:
s=list(input())
n=len(s)
ans="No"
if n==3:
  if s[0]==s[2]:
    ans="Yes"
if n%4==1:
  for i in range((n-1)//4):
    if s[i]==s[((n-1)//2)-1-i]==s[((n+3)//2)-1+i]==s[n-1-i]:
      ans="Yes"
    
if n%4==3:
  for j in range((n-3)//4):
    if s[j]==s[((n-1)//2)-1-j]==s[((n+3)//2)-1+j]==s[n-1-j] and s[((n+1)//4)-1]==s[(((3*n)+3)//4)-1] :
      ans="Yes"
    
print(ans)

Submission status: Wrong Answer

Solution code:
S = input()

def kaibun(S):
    def bun(s):
        return s == ''.join(list(reversed(s)))

    def kaibun0(s): 
        N = len(s)
        if N <= 3:
            return bun(s)
        A = (N - 1) / 2
        B = (N + 3) / 2

        a = s[0:int(A)]
        b = s[int(B)-1:N]

        if kaibun0(a):
            if a == b:
                return True
        else:
            return False

    
    return kaibun0(S)

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

Submission status: Wrong Answer

Solution code:
#文字列の入力
S = input()
#listを一文字ずつのlistに
S_list = list(S)
S_list_new = S_list
del S_list_new[int(len(S_list)/2):]


S_list_reverse = list(reversed(S_list))
S_list_new_reverse =  list(reversed(S_list_new))

#print(S_list_reverse)
if(S_list != S_list_reverse):
  print("No")
else:
  if(S_list_new != S_list_new_reverse):
    print("No")
  else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
S = list(input())
N = len(S)
#全体が回文である条件
S1 = S[:(N-1)//2]
S2 = S[((N+3)//2)-1:]
S2.reverse()
#半分が回文である条件
S3 = S[:(N-3)//4]
S4 = S[(N+1)//4:(N-1)//2]
S4.reverse()

S5 = S[(N+1)//2:(3*N-1)//4]
S6 = S[(3*N+3)//4:]
S5.reverse()

if S1 ==S2 and S3 ==S4 and S5 == S6:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import sys
s = input()

n = len(s)
m = int((n-1)/2)
b = s[:m]

for i in range(int(m/2)):
    if b[i:(i+1)] != b[(m-i-1):m-i]:
        print('No')
        sys.exit()
m = int((n+3)/2)
b = s[m-1:]
m= len(b)
for i in range(int(m/2)):
    if b[i:(i+1)] != b[(m-i-1):m-i]:
        print('No')
        sys.exit()
print('Yes')

Submission status: Wrong Answer

Solution code:
#文字列の入力
S = input()
#listを一文字ずつのlistに
S_list = list(S)
S_list_new = S_list
del S_list_new[int(len(S_list)/2):]


S_list_reverse = list(reversed(S_list))
S_list_new_reverse =  list(reversed(S_list_new))

#print(S_list_reverse)
if(S_list != S_list_reverse):
  print("No")
else:
  if(S_list_new != S_list_new_reverse):
    print("Noa")
  else:
    print("Yes")

Submission status: Wrong Answer

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

if (not S.islower()):
    sys.exit()
if (N < 3 or N > 99):
    sys.exit()
if (N%2 == 0):
    sys.exit()

av  = (N-1)/2
av  = int(av)
av2 = (N+3)/2
av2 = int(av2)

pal = S[0:av]
pal2 = S[av2-1:N]

if (S == S[::-1]):
    if (pal == pal[::-1] and pal2 == pal2[::-1]):
        print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = input()
if len(s) / 2 == 0:
    print("No")
    exit()

def check(i):
    i2 = i[len(i) // 2 + 1:len(i)]
    if i[0:len(i) // 2] == i2[::-1]:
        return(True)
    return(False)

s2 = s[0:(len(s) - 1) // 2]
s3 = s[(len(s) - 1) // 2 + 1:len(s)]
#s3 = s[(len(s) + 3) // 2 - 1:]

if check(s) == True and check(s2) == True and check(s3) == True:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
word=list(input())
word_number=len(word)

if word_number>=6:
    for i in range(int(word_number/2)):
        if word[i]==word[-i-1]:
            result='Yes'
            continue
        else:
            result='No'
            break

        result='Yes'
else:
    result='No'

print(result)

Submission status: Wrong Answer

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

S1 = S[0:N//2]
S1_1=S1[0:len(S)//4]
S1_2=S1[len(S)//4:len(S)//2]


S2= S[N//2+1:]
S2_1=S2[0:len(S)//4]
S2_2=S2[len(S)//4:len(S)//2]


if S1_1 == S1_2 and S2_1 == S2_2:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = input()

def kaibun(S):
    def bun(s):
        return s == ''.join(list(reversed(s)))

    def kaibun0(s): 
        N = len(s)
        if N <= 3:
            return bun(s)
        A = (N - 1) / 2
        B = (N + 3) / 2

        a = s[0:int(A)]
        b = s[int(B)-1:N]

        if kaibun0(a):
            if a == b:
                return True
        else:
            return kaibun0(a)

    
    return kaibun0(S)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

def jds(strin):
    js = 0
    nn = len(strin)
    for kk in range(int(nn / 2)):
        if strin[kk] == strin[nn - kk -1]:
            js = 1
    #print(strin)
    if nn == 1:
        js = 1
    return js
 
a = input()
jud = 0
 
b = a[:math.ceil((len(a) - 1) / 2)]
c = a[math.floor((len(a) + 1) / 2):]
 
jud += jds(a) + jds(b) + jds(c)
 
#print(jud)
if jud == 3:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
c1 = int((N-1)/2)
c2 = int((N+3)/2)
f = 0

if c1 % 2 == 0:
    for i in range(int(c1/2)):
        if S[i] != S[c1-1-i] or S[c2-1-i] != S[N-1-i]:
            f = 1
            break
else:
    for i in range(int((c1-1)/2)):
        if S[i] != S[c1-1-i] or S[c2-1-i] != S[N-1-i]:
            f = 1
            break

if f == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S=input()
n=len(S)
if n==3 and S[0]==S[2]:
  print('Yes')
elif n%4==3 and S[:(n-1)//2] == ''.join(list(reversed(S[(n-1)//2+1:]))) and S[:(n-3)//4] == ''.join(list(reversed(S[(n-3)//4+1:(n-1)//2]))) and S[(n-1)//2+1:-((n-3)//4+1)] == ''.join(list(reversed(S[-(n-3)//4:]))):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:

import sys
S = input()
N = len(S)

if (not S.islower()):
    sys.exit()
if (N < 3 or N > 99):
    sys.exit()
if (N%2 == 0):
    sys.exit()

av  = (N-1)/2
av  = int(av)
av2 = (N+3)/2
av2 = int(av2)

pal = S[0:av]
pal2 = S[av2-1:N]

if (S == S[::-1]):
    if (pal == pal2[::-1]):
        if (pal == pal[::-1] and pal2 == pal2[::-1]):
            print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S = list(input())

import sys
import math
flag1 = 0
flag2 = 0
flag3 = 0

if S == S[::-1]:
    flag1 = 1
    print(1)
else:
    print('No')
    sys.exit()

S1 = S[:(int((len(S) - 1)/2))]
if S1 == S1[::-1]:
    flag2 = 1
    print(2)
else:
    print('No')
    sys.exit()

S2 = S[int((len(S)+3)/2) - 1:]
if S2 == S2[::-1]:
    flag3 = 1
    print(3)
else:
    print('No')
    sys.exit()

if flag1 == 1 and flag2 == 1 and flag3 == 1:
    print('Yes')

Submission status: Wrong Answer

Solution code:
#input
S = input()

#output
N = len(S)
k = N//2
l = (N-3)//4
m = (3*N-1)//4

if (S[0:k] == S[:k:-1]) and (S[0:l] == S[(N-3)//2:l:-1]) and (S[(N+1)//2:m] == S[N-1:m:-1]):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
str = input()
list_str = list(str)

pal = "Yes"

for i in range(len(list_str) // 2):
  if list_str[i] != list_str[len(list_str) - 1 - i]:
    pal = "No"
    break

str_half = []

for i in range((len(list_str) // 2)):
  str_half.append(list_str[i])

print(str_half)
  
if len(str_half) <= 0:
  pal = "No"
else:
  for i in range(len(str_half) // 2):
    if str_half[i] != list_str[len(str_half) - 1 - i]:
      pal = "No"
      break

str_any = []

for i in range(((len(list_str) + 3) // 2) - 1, len(list_str)):
  str_any.append(list_str[i])

print(str_any)
  
if len(str_any) <= 0:
  pal = "No"
else:
  for i in range(len(str_any) // 2):
    if str_any[i] != list_str[len(str_any) - 1 - i]:
      pal = "No"
      break

print(pal)

Submission status: Wrong Answer

Solution code:
ostr = input()

slist = list(ostr)
length = len(slist)
half = length // 2

flg1 = True
flg2 = True
flg3 = True

len2 =  (length-1)//2
list2 = slist[:len2]
half2 = len(list2) // 2

len3 = ((length+3)//2)-1
list3 = slist[len3:]
half3 = len(list3) // 2

def judge(s, h):
    for i in range(1, h+1):
        print(s[i-1], s[-i])
        if s[i-1] != s[-i]:
            return False
    return True

flg1 = judge(slist, half)
flg2 = judge(list2, half2)
flg3 = judge(list3, half3)
print(flg1, flg2, flg3)

Submission status: Wrong Answer

Solution code:
S = input()

def kaibun(S):
    def bun(s):
        return s == ''.join(list(reversed(s)))

    def kaibun0(s): 
        N = len(s)
        if N <= 3:
            return bun(s)
        A = (N - 1) / 2
        B = (N + 3) / 2
        return kaibun0(s[0:int(A)]) and kaibun0(s[int(B)-1:N])
    
    return kaibun0(S)

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

Submission status: Wrong Answer

Solution code:
word=list(input())
word_number=len(word)

if word_number>=7:
    for i in range(int(word_number/2)):
        if word[i]==word[-i-1]:
            result='Yes'
            continue
        else:
            result='No'
            break

        result='Yes'
else:
    result='No'

print(result)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
s = list(S)
s_len = len(s)
s_1 = s_len-1
t = int(s_1/2)
x = 0
y = 0
z = 0

for i in range(0,t):
    if s[i] == s[s_1-i]:
        x += 1
if x == t and t%2 == 1:
    k = int((t-1)/2)
    for i in range(0,k):
        if s[i] == s[t-i-1]:
            y += 1
        if s[t+1+i] == s[s_1-i]:
            z += 1
        if y == k and z == k:
            print('Yes')
        else:
            print('No')
elif x == t and t%2 == 0:
    k = int(t/2)
    if s[i] == s[t-i-1]:
         y += 1
    if s[t+1+i] == s[s_1-i]:
         z += 1
    if y == k and z == k:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

S = input()
N = len(S)

befor = S[0:(( N ) // 2)]
after = S[(( N + 1) // 2):N]
print(befor)
print(after)
if ( befor == after ) :
    print("Yes")
else :
    print("No")

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
j1 = S[:int((N-1)/2)] == S[:int((N-1)/2)][::-1]

j2_str = S[0:int((N+1)/2-1)]
l2 = len(j2_str)
if l2%2==0:
    j2 = j2_str[:int((l2)/2-1)] == j2_str[:int((l2)/2-1)][::-1]
else :
    j2 = j2_str[:int((l2-1)/2)] == j2_str[:int((l2-1)/2)][::-1]

j3_str = S[int((N+3)/2-1):]
l3 = len(j3_str)
if l3%2==0:
    j3 = j3_str[:int((l3)/2-1)] == j3_str[:int((l3)/2-1)][::-1]
else :
    j3 = j3_str[:int((l3-1)/2)] == j3_str[:int((l3-1)/2)][::-1]

if N>=7:
    if j1&j2&j3:
        ans = 'Yes'
    else :
        ans = 'No'
elif N==5:
    if S[0]==S[1]==S[3]==S[4]:
        ans='Yes'
    else :
        ans='No'
else :
    if S[0]==S[2]:
        ans = 'Yes'
    else :
        ans = 'No'
print(ans)

Submission status: Wrong Answer

Solution code:

import sys
S = input()
N = len(S)

if (not S.islower()):
    sys.exit()
if (N < 3 or N > 99):
    sys.exit()
if (N%2 == 0):
    sys.exit()

av  = (N-1)/2
av  = int(av)
av2 = (N+3)/2
av2 = int(av2)

pal = S[0:av]
pal2 = S[av2-1:N]

if (pal == pal2[::-1]):
    if (pal == pal[::-1] and pal2 == pal2[::-1]):
        print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s1=input()
s=s1.split()
l=len(s1)
h=(l-1)//2
k1=s1[:h]
k2=s1[h+1:]
if k1==k2:
    l=len(s1)
    a=(l-1)//2
    s3=s1[:a]
    h2=(a-1)//2
    j1=s3[:h2]
    j2=s3[h2+1:]
    if j1==j2:
        l=len(s1)
        b=(l+3)//2
        b2=l-b+1
        s4=s1[:b2]
        h3=(b2-1)//2
        f1=s3[:h3]
        f2=s3[h3+1:]
        if f1==f2:
            print("Yes")
        else:
            print("No")
    else:
        print("No")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
def main():
    S = input()
    result = ""
    for i in range(len(S)//2):
        if S[i] != S[-i-1]:
           result = result + "No"
        else:
            result = result + "Yes"
    if "Yes" in result:
        print("Yes")
    else:
        print("No")
main()

Submission status: Wrong Answer

Solution code:
s = str(input())
c = 0
for i in range(len(s)//2):
    if s[i] != s[-i-1]:
        print("No")
        break
    else:
        c = 1
if c == 1:
    ku = int((len(s)-1)/2)
    news = s[:ku]
    if len(news) ==1:
        print("No")
    else:
        a = 0
        for a in range(len(news)//2):
            if news[a] != news[-a-1]:
                print("No")
                break
        ks = int((len(s)+1)/2)
        news = s[ks:]
        b = 0
        for b in range(len(news)//2):
            if news[b] != news[-b-1]:
                print("No")
                break
        print("Yes")

Submission status: Wrong Answer

Solution code:
def kaibun(s):
    half = int(len(s) /2)
    for i in range(half):
        if s[i] != s[-(i+1)]:
            return False
    return True

s = input()


if kaibun(s):
    half = int(len(s) /2)
    if half%2 == 0:
        s = s[:half]
        if s.count(s[0]) == len(s):
            print('Yes')
            exit()
        else:
            print('No')
            exit()
    else:
        s = s[:half]
        if kaibun(s):
            print('Yes')
        else:
            print('No')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import sys; sys.setrecursionlimit(2147483647); input = sys.stdin.readline
from math import floor, ceil, sqrt, factorial, log
from collections import Counter, defaultdict, deque
from operator import itemgetter
INF = float('inf'); MOD = 10**9+7
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(MI())
def LIR(n): return [LI() for i in range(n)]
def IS(): return input().rstrip()

def main():
    S = IS()
    N = len(S)
    if N%2 == 1:
        a = N//2
        if S[:a] == S[a+1:][::-1]:
            b = (N-1)//4
            if b%2 == 1:
                if S[:b] == S[b:a][::-1]:
                    c = (N+3)//2; d = c+(N-c)//2
                    if d%2 == 1:
                        if S[c-1:d-1] == S[d-1:][::-1]:
                            print('Yes')
                            sys.exit()
                        #else: print(7, S, N)
                    else:
                        if S[c-1:d] == S[d:][::-1]:
                            print('Yes')
                            sys.exit()
                        #else: print(6, S, N)
                #else: print(8, S, N)
            else:
                if S[:b] == S[b+1:a][::-1]:
                    c = (N+3)//2; d = c+(N-c)//2
                    if d%2 == 1:
                        if S[c-1:d-1] == S[d-1:][::-1]:
                            print('Yes')
                            sys.exit()
                        #else: print(5, S, N)
                    else:
                        if S[c-1:d] == S[d:][::-1]:
                            print('Yes')
                            sys.exit()
                        #else: print(4, S, N)
                #else: print(3, S, N)
        #else: print(2, S, N)
    #else: print(1, S, N)
    print('No')

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
#input
S = input()

#output
N = len(S)
k = N//2
l = (N-3)//4
m = (3*N-1)//4
if N == 3:
    if S[0] == S[2]:
        print("Yes")
    else:
        print("No")
else:
    if (S[0:k] == S[-1:k:-1] )and (S[0:l] == S[(N-3)//2:l:-1]) and (S[(N+1)//2:m] == S[N-1:m:-1]):
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
S = input()

def kaibun(S):
    def bun(s):
        return s == ''.join(list(reversed(s)))

    def kaibun0(s): 
        N = len(s)
        if N <= 3:
            return bun(s)
        A = (N - 1) / 2
        B = (N + 3) / 2
        return kaibun0(s[0:int(A)]) and kaibun0(s[int(B)-1:N])
    
    return kaibun0(S)

print(kaibun(S))

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
half = int((N - 1)/2)
count = 0
for i in range(half):
  if S[i] == S[-1-i]:
    count += 1
  else:
    pass
if count == half:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
s = str(input())
c = 0
for i in range(len(s)//2):
    if s[i] != s[-i-1]:
        print("No")
        break
    else:
        c = 1
if c == 1:
    ku = int((len(s)-1)/2)
    news = s[:ku]
    if len(news) ==1:
        print("Yes")
    else:
        a = 0
        for a in range(len(news)//2):
            if news[a] != news[-a-1]:
                print("No")
                break
        ks = int((len(s)+1)/2)
        news = s[ks:]
        b = 0
        for b in range(len(news)//2):
            if news[b] != news[-b-1]:
                print("No")
                break
        print("Yes")

Submission status: Wrong Answer

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

point1 = int((n-1)/2)
point2 = int((n+3)/2)

for i in range(point1):
    if s[i] != s[point1-1-i]:
        print("No")
        sys.exit()

for i in range(point1):
    if s[point2-1+i] != s[n-1-i]:
        print("No")
        sys.exit()
    
print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
seq = input()
if seq == seq[::-1]:
    if seq[:int((len(seq) - 1) / 2)] == seq[:int((len(seq) - 1) / 2)][::-1]:
        if seq[int((len(seq) + 3) / 2) - 1:] == seq[int((len(seq) + 3) / 2) - 1:][::-1]:
            print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
j1 = S[:int((N-1)/2)] == S[int((N-1)/2+1):]

j2_str = S[0:int((N+1)/2-1)]
l2 = len(j2_str)
if l2%2==0:
    j2 = j2_str[:int((l2)/2-1)] == j2_str[int((l2)/2):]
else :
    j2 = j2_str[:int((l2-1)/2)] == j2_str[int((l2-1)/2+1):]

j3_str = S[int((N+3)/2-1):]
l3 = len(j3_str)
if l3%2==0:
    j3 = j3_str[:int((l3)/2-1)] == j3_str[int((l3)/2):]
else :
    j3 = j3_str[:int((l3-1)/2)] == j3_str[int((l3-1)/2+1):]

if N>=7:
    if j1&j2&j3:
        ans = 'Yes'
    else :
        ans = 'No'
elif N==5:
    if S[0]==S[1]==S[3]==S[4]:
        ans='Yes'
    else :
        ans='No'
else :
    if S[0]==S[2]:
        ans = 'Yes'
    else :
        ans = 'No'
print(ans)

Submission status: Wrong Answer

Solution code:
s=input()
n = len(s)
flg_a = 0
flg_b=0

pa = 0
pb = 0

sa = s[0:int((n-1)/2)]
for i in range(int(((n-1)/2)//2)):
    if sa[i]==sa[-(i+1)]:
        pa += 1
if pa==((n-1)/2)//2:
    flg_a +=1

sb = s[int((n+3)/2)-1:n]
for j in range(int((n-(n+3)/2+1)//2)):
    if sb[j]==sb[-(j+1)]:
        pb +=1
if pb==(n-(n+3)/2+1)//2:
    flg_b +=1

if n==3 or flg_a+flg_b==2:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
def jds(strin):
    js = 0
    nn = len(strin)
    for kk in range(int(nn / 2)):
        if strin[kk] == strin[nn - kk -1]:
            js = 1
    #print(strin)
    if nn == 1:
        js = 1
    return js
 
a = input()
jud = 0
 
b = a[:int((len(a) - 1) / 2)]
c = a[int((len(a) +2) / 2):]
 
jud += jds(a) + jds(b) + jds(c)
 
#print(jud)
if jud == 3:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
x = input()
x_len = len(x)

x_1 = x[0:(x_len-1)//2]
x_2 = x[(x_len+2)//2:]

if x_1 == x_1[::-1] and x_2 == x_2[::-1]:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
seq = input()
if seq[:int((len(seq) - 1) / 2)] == seq[:int((len(seq) - 1) / 2)][::-1]:
    if seq[int((len(seq) + 3) / 2) - 1:] == seq[int((len(seq) + 3) / 2) - 1:][::-1]:
        print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s=list(input())
n=len(s)
ans="Yes"
if n==3:
  if s[0]!=s[2]:
    ans="No"
if n%4==1:
  for i in range((n-1)//4):
    if s[i]!=s[((n-1)//2)-1-i]:
      ans="No"
    if s[((n+3)//2)-1+i]!=s[n-1-i]:
      ans="No"
if n%4==3:
  for j in range((n-3)//4):
    if s[j]!=s[((n-1)//2)-1-j]:
      ans="No"
    if s[((n+3)//2)-1+j]!=s[n-1-j]:
      ans="No"
print(ans)

Submission status: Wrong Answer

Solution code:
wholeString = input()
firstSub = wholeString[0:int((len(wholeString)-1)/2)]
secondSub = wholeString[int(((len(wholeString)+3)/2)-1):]

if len(wholeString) % 2 == 0 or len(wholeString) < 3 or len(wholeString) > 99:
  print("No")
if firstSub == firstSub[::-1] and secondSub == secondSub[::-1]:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
list_a = []
count = 0

for i in range(0, N):
    list_a.append(S[i])

for i in range(0, N):
    if list_a[i] == list_a[N-1-i]:
        count += 1
    else:
        pass

for j in range(0, int(N//2)):
    if list_a[j] == list_a[int((N-3-j)/2)] and list_a[int((N+1+j)/2)] == list_a[N-1-j]:
        count += 1
    else:
        pass

if count > N:
    print("Yes")
else:
    print("No")