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: Runtime Error

Solution code:
S = input()
n = 0
def judge(s):
  i = 0
  N = len(s)
  while i < (N-1) / 2:
    if S[i] != S[N-1]:
      break
    elif i == (N-1)/2:
      n += 1
      break
    else:
      i += 1
judge(S)
judge(S[0 : (len(S)-3)/2])
judge(S[(len(S)+1)/2] : len(S)-1)

if n == 3:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
wholeString = input()
firstSub = wholeString[0:(len(wholeString)-1)/2]
secondSub = wholeString[((len(wholeString)+3)/2)-1:]
if firstSub == firstSub[::-1] and secondSub == secondSub[::-1]:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
S = input()
n = 0
def judge(s):
  i = 0
  N = len(s)
  while i < (N-1) / 2
    if S[i] != S[N-1]:
      break
    elif i == (N-1)/2:
      n += 1
      break
    else:
      i += 1
judge(S)
judge(S[0 : (len(S)-3)/2])
judge(S[(len(S)+1)/2] : len(S)-1)

if n == 3:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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[3]:
        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: Runtime Error

Solution code:
s = input()
a=1
for i in range(len(s)):
  if(s[i]!=s[-i-1]):
    a=0
    break
for i in range((len(s)-1)//2):
  if(s[i]!=s[(len()-3)//2]):
    a=0
if(a==1):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
s=input()
n=len(s)
count=0
a=(n-1)//2
b=(n+3)//2
for i in range(n//2):
  if s[i]!=s[-abs(i+1)]:
    count+=1
    
for i in range(a//2):
  c=ord(s[i])
  d=ord(s[(a-1-i)])
  if c!=d:
    count+=1

for i in range((n-b+1)//2):
  c=ord(s[n-i])
  d=ord(s[b-1+i])
  if c!=d:
    count+=1

if count!=0:
  print('No')
else:
  print('Yes')

Submission status: Runtime Error

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[3]:
        print("Yes")
    else:
        print("No")
elif N > 3:
    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: Runtime Error

Solution code:
import sys
a= str(input())
kaibun = list(a)
n = int(len(kaibun))
answer = "No"
strongn1 = int((n-1)/2)
strongn2 = int((n+3)/2)
for i in reversed(range((int((n+1)/2)),n)):
    if kaibun[i] == kaibun[n-i-1]:
        answer = "Yes"
    else:
        answer = "No"
        print(answer)
        sys.exit()
for i in range(int(strongn1/2)):
    if kaibun[i] == kaibun[strongn1-i]:
        answer = "Yes"
    else:
    	answer="No"
    	print(answer)
    	sys.exit()
for i in reversed(range(strongn2,n,int(strongn1/2))):
    if kaibun[i] == kaibun[i-strongn2]:
        answer = "Yes"
    else:
      	answer = "No"
print(answer)

Submission status: Runtime Error

Solution code:
S=str(input())
import sys
t=0
lista=[]
for i in range(99):
  try:
    lista.append(S[i])
    t=t+1
  except IndexError:
    break
u=t//2
v=u//2+1
p=1
for i in range(v):
  if S[i]==S[u-i-1]:
    p=p*1
  else:
    print ('No')
    sys.exit()
for j in range(v):
  if S[u+j+1]==S[t-1-j]:
    p=p*1
  else:
    print ('No')
    sys.exit()
if t>3:
  print ('Yes')
else:
  if S[0]=S[2]:
    print ('Yes')
  else:
    print ('No')

Submission status: Runtime Error

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[3]:
        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: Runtime Error

Solution code:
S=str(input())
import sys
t=0
lista=[]
for i in range(99):
  try:
    lista.append(S[i])
    t=t+1
  except IndexError:
    break
print (t)
u=t//2
v=u//2+1
p=1
for i in range(v):
  if S[i]==S[u-i-1]:
    p=p*1
  else:
    print ('No')
    sys.exit()
for j in range(v):
  if S[u+j+1]==S[t-1-j]:
    p=p*1
  else:
    print ('No')
    sys.exit()
if t>3:
  print ('Yes')
else:
  if S[0]=S[2]:
    print ('Yes')
  else:
    print ('No')

Submission status: Runtime Error

Solution code:
S=list()
N=len(S)
X=(int(N)-1)/2
Y=(int(N)+3)/2
T=S(range(1,X))
U=S(range(Y,N))
if str(S)==str(S)[::-1] and str(T)==str(T)[::-1] and str(U)==str(U)[::-1]:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
S = input()
N = len(S)
n = 0
i = 0

while i < (N-1) / 2
  if S[i] != S[N-1]:
    break
  elif i == (N-1)/2:
    n += 1
    break
  else:
    i += 1
    
s = S[:(N-3)/2]
l = len(s)
i = 0

while i < (l-1) / 2
  if s[i] != s[l-1]:
    break
  elif i == (N-1)/2:
    n += 1
    break
  else:
    i += 1
    
S = S[(N+1)/2:]
i = 0
while i < (l-1) / 2
  if S[i] != S[l-1]:
    break
  elif i == (l-1)/2:
    n += 1
    break
  else:
    i += 1

if n == 3:
  print("Yes")

Submission status: Runtime Error

Solution code:
S=input()
N=len(S)
flag=0
for i in range((N-1)//4):
	if S[i]!=S[(N-1)//2 -i-1]:
		flag=1
		break
	if S[(N+3)//2 +i-1]!=S[N-1-i]:
		flag=1
		break
for j in range((N-1)//2):
	if S[i]!=S[N-1-i]:
		flag=1
		break
if flag==0:
	print("Yes")
else:
	print("No")

Submission status: Runtime Error

Solution code:
import math

N, M = map(int, input().split())

def comb(n, r):
    if n == 0:
        return 0
    if r == 0:
        return 0
    if n < 2:
        return 0
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

if N + M < 2:
    print(0)
elif N == 1 and M == 1:
    print(0)
else:
    ans = comb(N, 2) + comb(M, 2)
    print(ans)

Submission status: Runtime Error

Solution code:
s = input()
f = 0
a = 0; b = 0; c = 0
if len(s)==3 and len(set(s))==1:
    print('Yes')
else :
    
    for i in range(len(s)//2):
        if s[i]==s[-1-i]:
            a += 1
            if a == len(s)//2:
                f += 1
    for i in range(len(s)//4):
        if s[i]==s[(len(s)-1)//2-1-i]:
            b += 1
        if b == len(s)//4:
            f += 1
        if s[(len(s)+3)//2-1+i]==s[len(s)-1+i]:
            c += 1
        if c == len(s)//4:
            f += 1
    print('Yes' if f == 3 else 'No')

Submission status: Runtime Error

Solution code:
from scipy.special import comb

gusu, kisu = input().split()
gusu = int(gusu) # 個数
kisu = int(kisu) # 個数
gusu_num = comb(gusu, 2, exact=True)
kisu_num = comb(kisu, 2, exact=True)
print(gusu_num + kisu_num)

Submission status: Runtime Error

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

S = str(input())
if kaibun(S) == True:
    M = S.list[0 : ((len(S) -2) // 2)]
    if kaibun(M) == True:
        N = S.list[((len(S) + 2) // 2) : (len(S) - 1)]
        if kaibun(N) == True:
            print("Yes")
        else:
            print("No")
    else:
        print("No")
else:
    print("No")

Submission status: Runtime Error

Solution code:
S=input()
N=len(S)
X=(int(N)-1)/2
Y=(int(N)+3)/2
T=S(range(1,X))
U=S(range(Y,N))
if str(S)==str(S)[::-1] and str(T)==str(T)[::-1] and str(U)==str(U)[::-1]:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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

x = (N-1)/2
y = (N+3)/2

a = S[:x]
b = S[:y]

if a == reversed(a) and b == reversed(b):
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
s = input()
n = len(s)
##1つ目の条件
n1 = int((n-1)/2)
s1 = s[0:n1]
s_rev = s1[::-1]
 
##2つめの条件
n2 = int((n+3)/2)
s2 = s[n2-1:n]
s2_rev = s2[::-1]
 
##判定
if s1 == s_rev and s2 == s2_rev:
  print('Yes')
elif n =< 2:
  print('No')
else:
  print('No')

Submission status: Runtime Error

Solution code:
L = int(input())/3
print(L**3)

Submission status: Runtime Error

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

S = str(input())
if kaibun(S) == True:
    M = list[0 : ((len(S) -2) // 2)]
    if kaibun(M) == True:
        N = list[((len(S) + 2) // 2) : (len(S) - 1)]
        if kaibun(N) == True:
            print("Yes")
        else:
            print("No")
    else:
        print("No")
else:
    print("No")

Submission status: Runtime Error

Solution code:
S = input()

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

if solve(S) and solve(S[:(len(S) - 1) // 2]) and solve(S[(len(S) + 3) // 2 + 1:]):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
def F(s):
	return s[:len(s)//2:-1] in s[len(s)//2+1:]

S = input()
fS = S[:len(S) // 2]
lS = S[len(S) // 2 + 1:]
if F(S) and F(fS) and F(lS):
	print("Yes")
else:
	print("No")

S = input()

Submission status: Runtime Error

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

x = (N-1)/2
y = (N+3)/2

if S[:x] == S[:x].reverse() and S[:y] == S[:y].reverse():
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

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: Runtime Error

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

S = str("akasaka")
if kaibun(S) == True:
    M = list[0 : ((len(S) -2) // 2)]
    if kaibun(M) == True:
        N = list[((len(S) + 2) // 2) : (len(S) - 1)]
        if kaibun(N) == True:
            print("Yes")
        else:
            print("No")
    else:
        print("No")
else:
    print("No")

Submission status: Runtime Error

Solution code:
import sys

def ispalindrome(str):return 1 if str == str[::-1] else 0

S=str(input())
len_s = len(S)
len_h = int((len_s-1)/2)


if ispalindrome(S)==0:
	print('No')
	sys.exit(1)
else:
	if ispalindrome(S[:len_h])==0:
		print('No')
		sys.exit(1)
	elif ispalindrome(S[-1:len_h])==0:
		print('No')
		sys.exit(1)
print('Yes')

Submission status: Runtime Error

Solution code:
s = list(str(input()))
t = s
t.reverse()
x = ''.join(s)
y = ''.join(t)
n = len(s)
k = int((n-1)/2)
M = int((n+3)/2)
l = []
m = []
for i in range(N):
    l.append(s[i])
for i in range (M-1,N):
    m.append(s[i])
a = ''.join(l)
b = ''.join(m)
l.reverse()
m.reverse()
A = ''.join(l)
B = ''.join(m)
if (a==A and b==B and x == y):
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

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

N1=int((N-1)/2)
N2=int((N+3)/2-1)

S1=list(S[:N1])
S2=list(S[N2:])


S3=list(reversed(S1))
S4=list(reversed(S2))
Sr=list(reversed(S))

if S==Sr:
    if S1==S3:
        if S2==S4:
            print("Yes")
            sys.exit()
print("No")

Submission status: Runtime Error

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

x = (N-1)/2
y = (N+3)/2


if S[:x] == S[:x].reverse() and S[:y] == S[:y].reverse():
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

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: Runtime Error

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

S = str(input())
if kaibun(S) == True:
    M = list[1 : ((len(S) -1) // 2)]
    if kaibun(M) == True:
        N = list[((len(S) + 3) // 2) : (len(S) - 1)]
        if kaibun(N) == True:
            print("Yes")
        else:
            print("No")
    else:
        print("No")
else:
    print("No")

Submission status: Runtime Error

Solution code:
from collections import deque
S = input()
N = len(S) 
s1 = deque(S[0:int((N-1)/2)])
s2 = deque(S[int((N+3)/2)-1:N])
t1 = deque(S[0:int((N-1)/2)])
t2 = deque(S[int((N+3)/2)-1:N])

while len(s1) >= 2:
    if s1.popleft() != s2.pop():
        ans = "No"
        break
    if len(s1) == 1 or len(s1) == 0:
        ans = "preYes"
        break

if ans == "preYes":
    while len(t1) >= 2:
        if t1.pop() != t1.popleft():
            ans = "No"
            break
        if len(t1) == 1 or len(t1) == 0:
            ans = "Yes"
            break
print(ans)

Submission status: Runtime Error

Solution code:
S = input()
N = len(S)
A = int((N - 1) / 2)
B = int((A - 1) / 2)
X = 0

for i in range(A):
  if S[i] != S[-i-1]:
    X += 1

if N == 5:
  if S[0] != S[1]:
    X += 1

if N >= 7:
  for i in range(B):
  	if S[i] != S[A-1]:
    	X += 1
      
if X == 0:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def strongispalindrome(s):
	if len(s) == 1:
		return True
	else:
		if s[::-1] == s:
			if strongispalindrome(s[:len(s)//2]) and strongispalindrome(s[len(s)//2 + 1:]):
				return True
		else:
			return False

s = input()
if len(s)%2 == 0: exit(print("No"))
if strongispalindrome(s):
	print("Yes")
else:
	print("No")

Submission status: Runtime Error

Solution code:
s = str(input())
h = len(s)

s_1 = s[:(h-1)//2]
h_1 = len(s_1)//2+2

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

ans = 0


for i in range(h_1):
    if s_1[i] != s_1[h_1-i-1]:
       ans -= 10000000000
       break
    else:
        ans += 1
        continue
        
for i in range(h_2):
    if s_2[i] != s_2[h_2-i-1]:
       ans -= 10000000000
       break
    else:
        ans += 1
        continue



if ans > 0:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
from math import floor as f
S = list(input())
N = len(S)


for c in range(f(N / 2)):
    if S[c] == S[-1 * c - 1]:
        pass
    else:
        exit("No")


for c in range(f((N - 1) / 4)):
    if S[c] == S[-1 * c + -1 * f(N / 2) - 2]:
        pass
    else:
        exit("No")



print("Yes")

Submission status: Runtime Error

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: Runtime Error

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

S = str(input())
if kaibun(S) == True:
    M = list[1 : ((len(S) -1) / 2)]
    if kaibun(M) == True:
        N = list[((len(S) + 3) / 2) : (len(S) - 1)]
        if kaibun(N):
            print("Yes")
        else:
            print("No")
    else:
        print("No")
else:
    print("No")

Submission status: Runtime Error

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: Runtime Error

Solution code:
s = input()
f = 0
a = 0; b = 0; c = 0
for i in range(len(s)//2):
    if s[i]==s[-1-i]:
        a += 1
    if a == len(s)//2:
        f += 1
for i in range(len(s)//4):
    if s[i]==s[(len(s)-1)//2-1-i]:
        b += 1
    if b == len(s)//4:
        f += 1
    if s[(len(s)+3)//2-1+i]==s[len(s)-1+i]:
        c += 1
    if c == len(s)//4:
        f += 1
print('Yes' if f == 3 else 'No')

Submission status: Runtime Error

Solution code:
X=input()
L=X[::-1]
if N % 2 == 1:
    if L==X:
        N=len(X)
        a=int((N-1)/2)
        b=int((N+3)/2)
        Ya=X[0:a]
        LYa=Ya[::-1]
        Yb=X[b-1:N]
        LYb=Yb[::-1]
        if LYa ==Ya and LYb == Yb:
            print("Yes")
        else:
            print("No")
    else:
        print("No")
else:
    print("No")

Submission status: Runtime Error

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

S = str(input())
if kaibun(S) == True:
    M = list[1 : ((len(S) -1) / 2)]
    if kaibun(M) == True:
        N = list[((len(S) + 3) / 2) : len(S)]
        if kaibun(N):
            print("Yes")
        else:
            print("No")
    else:
        print("No")
else:
    print("No")

Submission status: Runtime Error

Solution code:
ls = list(map(str,input()))
a=[]
b=[]
c=[]
d=[]
e=[]
f=[]
n = len(ls)
for i in range(int((n-1)/2)):
    a.append(ls[i])
for j in range(int((n+1)/2),n):
    b.append(ls[j])
b.reverse()
if b != a:
    print('No')
else:
    if (n-1) % 4 ==0:
        for k in range(int((n-1)/4)):
            c.append(a[i])
        for l in range(int((n-1)/4),(n-1)/2):
            d.append(a[i])
        for m in range(int((n-1)/4)):
            e.append(b[i])
        for n in range(int((n-1)/4),int((n-1)/2)):
            f.append(b[i])
        d.reverse()
        f.reverse()
        if (c == d) and (e == f):
            print('Yes')
        else:
            print('No')
    else:
        for k in range(int((n-3)/4)):
            c.append(a[i])
        for l in range(int((n+1)/4),int((n-1)/2)):
            d.append(a[i])
        for m in range(int((n-3)/4)):
            e.append(b[i])
        for n in range(int((n+1)/4),int((n-1)/2)):
            f.append(b[i])
        d.reverse()
        f.reverse()
        if (c == d) and (e == f):
            print('Yes')
        else:
            print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = str(input())
h = len(s)

s_1 = s[:(h-1)//2]
h_1 = len(s_1)//2+1

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

ans = 0


for i in range(h_1+1):
    print(s_1[i], s_1[h_1-i])
    if s_1[i] != s_1[h_1-i]:
       ans -= 10000000000
       break
    else:
        ans += 1
        continue
        
for i in range(h_2+1):
    print(s_2[i], s_2[h_2-i])
    if s_2[i] != s_2[h_2-i]:
       ans -= 10000000000
       break
    else:
        ans += 1
        continue



if ans > 0:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
x = input()
w = "" 
for i in x: 
    w = i + w 
    if (x==w): 
        print("Yes")
	else:
      	print("No")

Submission status: Runtime Error

Solution code:
import sys
sys.setrecursionlimit(2147483647)

s = input()
n = len(s)
a = n-1
b = n-3
en = a/2
sta = b/2
bb = n - int(sta) + 1
ans = 0

if en % 2 == 0:
    mid = int(en)/2
else:
    aa = int(en)-1
    mid = aa/2

if bb % 2 == 0:
    mid2 = bb/2
else:
    cc = bb-1
    mid2 = cc/2

for v in range(int(mid)):
    if s[v] == s[int(en) - v - 1]:
        ans += 1
for k in range(int(mid2)):
    if s[int(sta) + v] == s[n - v - 1]:
        ans += 1

if ans == int(mid) + int(mid2):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
def pali(s):
  l=len(s)
  p=True
  for i in range((l-1)/2):
    if s[i]!=s[l-i]:
      p=False
      break
  return p

S=input()
s1=[]
  for i in range((l-1)/2):
    s1.append(S[i])
s2=[]
  for i in range((l+3)/2, l):
    s2.append(S[i])
l=len(S)
if pali(S):
  if pali(s1):
    if pali(s2):
      print("Yes")
    else:
      print("No")
  else:
    print("No")
else:
  print("No")

Submission status: Runtime Error

Solution code:
from collections import deque
S = input()
N = len(S)
DS = deque(S)    
S1 = deque(S[0:int((N-1)/2)])
S2 = deque(S[int((N+3)/2)-1:N])

s1 = S1
s2 = S2
while len(s1) >= 2:
    if s1.popleft() != s2.pop():
        ans = "No"
        break
    if len(s1) == 1 or len(s1) == 0:
        ans = "preYes"

S1 = deque(S[0:int((N-1)/2)])
S2 = deque(S[int((N+3)/2)-1:N])
if ans == "preYes":
    t1 = S1
    t2 = S2
    while len(t1) >= 2:
        if t1.pop() != t1.popleft():
            ans = "No"
            break
        if len(t1) == 1 or len(t1) == 0:
            ans = "Yes"
print(ans)

Submission status: Runtime Error

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

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

judge = 0

for i in range(int(point1/2)):
    if s[i] != s[point1-1-i]:
        judge = 1
        break

for i in range(int(point1/2)):
    if s[point2-1+i] != s[n-1-i]:
        judge = 1
        break
    
if judge == 0:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
S = [i for i in input()]
f = 0
for i in range(len(S)//2):
  if not S[i] == S[-i]:
    f = 1
    print('No')
    break
if f == 0:
  s = S[:int((len(S)-1)/2)]
  for i in range(len(s)//2):
    if not s[i] == s[-i]:
      f = 1
      print('No')
      break
if f == 0:
  s = S[int((len(S)+3)/2):]
  for i in range(len(S)//2):
    if not s[i] == s[-i]:
      f = 1
      print('No')
      break
if f ==0:
  print('Yes')

Submission status: Runtime Error

Solution code:
s = input()
flg = True
i = 0
j = len(s)

while i != j:
    if s[i] != s[j]:
        flg = False
        break
    else:
        i += 1
        j -= 1

i = 0
j = (len(s) - 1) / 2

while i != j:
    if !(flg):
        break
    else if s[i] != s[j]:
        flg = False
        break
    else:
        i += 1
        j -= 1

i = (len(s) + 3) / 2
j = len(s)

while i != j:
    if !(flg):
        break
    else if s[i] != s[j]:
        flg = False
        break
    else:
        i += 1
        j -= 1

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

Submission status: Runtime Error

Solution code:
s = input()
m = (len(s) - 1) / 2
l = s[:m]
r = s[(len(s) + 3) / 2 - 1:]


def check(s):
    mid = len(s) // 2
    left = s[:mid]
    right = s[mid+1:]
    if left == right[::-1]:
        return True
    else:
        return False

if check(s) and check(r) and check(l):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
S = [i for i in input()]
f = 0
for i in range(len(S)//2):
  if not S[i] == S[-i]:
    f = 1
    print('No')
    break
if f == 0:
  s = S[:int((len(S)-1)/2)]
  for i in range(len(s)):
    if not s[i] == s[-i]:
      f = 1
      print('No')
      break
if f == 0:
  s = S[int((len(S)+3)/2):]
  for i in range(len(S)):
    if not s[i] == s[-i]:
      f = 1
      print('No')
      break
if f ==0:
  print('Yes')

Submission status: Runtime Error

Solution code:
import sys
sys.setrecursionlimit(2147483647)

s = input()
n = len(s)
a = n-1
b = n-3
en = a/2
sta = b/2
bb = n - sta + 1
ans = 0

if en % 2 == 0:
    mid = en/2
else:
    aa = en-1
    mid = aa/2

if bb % 2 == 0:
    mid2 = bb/2
else:
    cc = bb-1
    mid2 = cc/2

for v in range(int(mid)):
    if s[v] == s[int(en) - v - 1]:
        ans += 1
for k in range(int(mid2)):
    if s[int(sta) + v] == s[n - v - 1]:
        ans += 1

if ans == int(mid) + int(mid2):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
import sys
sys.setrecursionlimit(2147483647)

s = input()
n = len(s)
a = n-1
b = n-3
en = a/2
sta = b/2
bb = n - sta + 1
ans = 0

if en % 2 == 0:
    mid = en/2
else:
    aa = en-1
    mid = aa/2

if bb % 2 == 0:
    mid2 = bb/2
else:
    cc = bb-1
    mid2 = cc/2

for v in range(int(mid)):
    if s[v] == s[int(en) - v - 1]:
        ans += 1
for k in range(int(mid2)):
    if s[int(sta) + v] == s[n - v - 1]:
        ans += 1

if ans == mid + mid2:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
S = input()

n = len(S)
ans = "No"
if S[:n//2] == S[n//2+1:][::-1]:
    S1 = S[:(n-1)//2]
    n1 = len(S1)
    if n1 % 2 == 1:
        if S1[:n1//2] == S1[(n1+1)//2:][::-1]:
            S2 = S[(n+3)//2-1:]
            n2 = len(S2)
        if S2[:n2//2] == S2[(n2+1)//2:][::-1]:
            ans = "Yes"

print(ans)

Submission status: Runtime Error

Solution code:

def check_str( ss ):
  sslen = len(ss)
  
  #ccnt = 0
  #for c in ss:
  #  if( ss[0] == c ):
  #    ccnt+=1
  
  if( sslen == ccnt ):
    return False
  
  return (ss[:sslen//2] == ss[sslen//2+1:][::-1])
  
s = input()

slen = len(s)

if( not check_str( s ) ):
  print( "No" )
else:
#print(s[:slen//2])
#print(s[slen//2+1:][::-1])

  s1 =  s[:slen//2]
  s2 = s[slen//2+1:]
  
  
  if( (not check_str( s1 )) or (not check_str( s2 )) ):
    print( "No" )
  else:
    print( "Yes" )

#s1 = s[:len(s)-1]

#s1

Submission status: Runtime Error

Solution code:
import xgboost as xgb
from sklearn.model_selection import GridSearchCV
import math
import pandas as pd
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import seaborn as sns  # pip install seaborn
import re
import statsmodels.api as sm
import statsmodels.formula.api as smf
from sklearn.model_selection import cross_val_score
from sklearn.linear_model import LinearRegression
from sklearn.model_selection import train_test_split

S=input()

if S[0:math.floor((len(S)/2))] == S[math.floor((len(S)/2))+1:len(S)]:
    p = S[0:math.floor((len(S)/2))]
    q = S[math.floor((len(S)/2))+1:len(S)]
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = [i for i in input()]
f = 0
for i in range(len(S)//2):
  if not S[i] == S[-i]:
    f = 1
    print('No')
    break
if f == 0:
  for i in range(int((len(S)-1)/2)):
    if not S[i] == S[int((len(S)-1)/2-i)]:
      f = 1
      print('No')
      break
if f == 0:
  for i in range(int((len(S)+3)/2), len(S)) and f == 0:
    if not S[i] == S[-i]:
      f = 1
      print('No')
      break
if f ==0:
  print('Yes')

Submission status: Runtime Error

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

def main():
    s = input()
    condtion1 = ((len(s) - 1) / 2 ) - 1
    condtion2 = ((len(s) + 3) / 2 ) - 1
    flag = False
    for i, j in [(0, condtion1), (condtion2, len(s)-1)]:
        if isBatch(s[i:j]):
            flag = True
        else:
            flag = False
    if flag:print("Yes")
    else: print("No")

if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
s = input()
a = s[::-1]
b = (s[0:((len(s)-1)//2])
c = (s[((len(s)*3)//2:-1])
if s == a and b == c:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

def kaibun_checker(s):
    rev_s = s[::-1]
    len_s = len(s)
    for i in range(len_s//2):
        if s[i]!=rev_s[i]:
            return False
    return True

if kaibun_checker(S[:]) and kaibun_checker(S[(N+3)//2]) and kaibun_checker(S[(N+3)//2-1:]):
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

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

flag = True

for i in range(int(len(S)/2)):
  if S[i]!=S[-1-i]:
    flag = False
    breakat

if flag==True:
  right = int((N-1) / 2)
  subS = S[0:right]
  for i in range(int(len(subS)/2)):
    if subS[i]!=subS[-1-i]:
      flag = False
      break

if flag==True:
  left = int((N+3) / 2)
  subS = S[left-1:N]
  for i in range(int(len(subS)/2)):
    if subS[i]!=subS[-1-i]:
      flag = False

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

Submission status: Runtime Error

Solution code:
l = int(input())

ans = pow(l/3, 3)
print(ans)

Submission status: Runtime Error

Solution code:
def judge(s):
    ok = True
    n = len(s)
    m = (n - 1) // 2
    if (m == 0):
        ok = (s[0] == s[1])
    else:
        for i in range(m):
            if s[i] != s[(n-1)-i]:
                ok = False
                break
    return ok

def strong_judge(s):
    ok = judge(s)
    n = len(s)
    m = (n - 1) // 2
    kf = (m - 1) // 2
    kb = m + kf + 1
    sf = s[0:m]
    sb = s[(m + 1):n]
    if ok:
        ok = judge(sf) and judge(sb)
    return ok

s = str(input())

if ((len(s) % 2 == 0) or (len(s) > 99) or (len(s) < 3)):
    print("No")
else:
    if strong_judge(s):
        print("Yes")
    else:
        print("No")

Submission status: Runtime Error

Solution code:
def checkPal(s):
  w = s
  w[::-1]
  if w==s:
    return True
  return False
s = input()
if checkPal(s[:(n//2)]) and checkPal(s) and checkPal(s[(n//2)+1:]:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
h,w,k = map(int,input().split())

sl = []
for _ in range(h):
    s = list(input())
    s = [int(i) for i in s]
    sl.append(s)
import itertools
sl_ac = []
for s in sl:
     ac = [0] + list(itertools.accumulate(s))
     sl_ac.append(ac)

anss = float("inf")


from itertools import product
for bits in product([0, 1], repeat=h-1):
    ans = 0
    ans += sum(bits)
    p = 0
    group = [0 for i in range(h)]
    for idx, bit in enumerate(bits):
        group[idx] = p
        p += bit
    group[-1] = p
    sum_group = [0 for i in range(sum(bits) + 1)]
    reset = 0
    flag = "OK"
    for i in range(w):
        for j in range(h):
            sum_group[group[j]] += sl[j][i]
        if max(sum_group) > k:
            if i == 0:
                flag = "NG"
            else:
                ans += 1
                reset = i
                sum_group = [0 for i in range(sum(bits) + 1)]
                for j in range(h):
                    sum_group[group[j]] += sl[j][i]
                if max(sum_group) > k:
                    flag = "NG"

    if flag == "OK":
        anss = min(ans, anss)
print(anss)

Submission status: Runtime Error

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

def main():
    s = input()
    condtion1 = ((len(s) - 1) / 2 ) - 1
    condtion2 = ((len(s) + 3) / 2 ) - 1
    flag = False
    for i, j in [(0, condtion1), (condtion2, len(s))]:
        if isBatch(s[i:j]):
            flag = True
        else:
            flag = False
    if flag:print("Yes")
    else: print("No")

if __name__ == "__main__":
    main()

Submission status: Runtime Error

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

small = round((N-1)/2)
big = round((N+3)/2)-1
smallS = S[0:small]
bigS = S[big:N]

if L > 5:
    if smallS == bigS:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Submission status: Runtime Error

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

def main():
    s = input()
    condtion1 = (len(s) - 1) / 2 - 1
    condtion2 = (len(s) + 3) / 2 - 1
    flag = False
    for i, j in [(0, condtion1), (condtion2, len(s))]:
        if isBatch(s[i:j]):
            flag = True
        else:
            flag = False
    if flag:print("Yes")
    else: print("No")

if __name__ == "__main__":
    main()