TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: 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.

Submission attempts (in order):
import math
s = input()
n = len(s)
zen_c = 0
z = math.floor((n-1)/2)
k = math.floor((n+2)/2)
zenhan = s[0:z]
kouhan = s[k:n]
zen_l = len(zenhan)-1
count = 0
for i in range(0, n):
  if s[i] == s[n-i-1]:
    count += 1
for i in range(0, math.floor((zen_l+1)/2)):
  if zenhan[i] == zenhan[zen_l-i] and i != (zen_l-i):
    print(zenhan[i])
    zen_c += 1
zen_l = math.floor(zen_l/2)
n = math.floor((n-1)/2)
print('Yes' if zen_c == zen_l and zenhan == kouhan else 'No')

import math
s = input()
n = len(s)
zen_c = 0
kou_c = 0
z = math.floor((n-1)/2)
k = math.floor((n+2)/2)
zenhan = s[0:z]
kouhan = s[k:n]
zen_l = len(zenhan)-1
for i in range(0, math.floor((zen_l+1)/2)):
  if zenhan[i] == zenhan[zen_l-i] and i != (zen_l-i):
    zen_c += 1
print('Yes' if zen_c == math.floor(z/2) and zenhan == kouhan else 'No')

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = input()

if s[:(n-1)/2] == s[(n+3)/2:] and s[:(n-1)/2] == s[(n+3)/2:]:
  print('Yes')
else:
  print('No')

s = input()
n = len(s)

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


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
s= input()
l = list(s)
ans= "No"
for i in range(0,(len(s)-1)//2):
  if(l[i]!=l[-1-i]):
    ans = "No"
print(ans)

s= input()
l = list(s)
ans= "Yes"
if(s != s[::1]):
    ans = "No"
    break
else:
    s1 = s[:len(s)//2]
    s2 = s[len(s)//2+1:]
    if s1!=s2:
        print("No")
    else:
        print("Yes")
print(ans)


s= input()
l = list(s)
ans= "Yes"
for i in range(0,(len(s)-1)//2):
    if(l[i]!=l[-1-i]):
        ans = "No"
        break
    else:
        s1 = s[:len(s)//2]
        s2 = s[len(s)//2+1:]
        if s1!=s2:
            print("No")
        else:
            print("Yes")
print(ans)


s= str(input())
if s != s[::-1]:
    print("No")
    exit()
else:
    s1 = s[:len(s)//2]
    s2 = s[len(s)//2+1:]
    if (s1!=s2):
        print("No")
    else:
        print("Yes")

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = input().strip()
n = len(s)

def is_kaibun(s):
    n = len(s)
    head = s[:(n - 1) // 2]
    tail = s[(n + 3) // 2-1:]
    print("head = {} tail = {}".format(head, tail[::-1]))
    return head == tail[::-1]

if is_kaibun(s) and is_kaibun(s[:(n-1)//2]) and is_kaibun(s[(n+3)//2-1:]):
    print("Yes")
else:
    print("No")


s = input().strip()
n = len(s)

def is_kaibun(s):
    n = len(s)
    head = s[:(n - (n % 2)) // 2]
    tail = s[(n+(n%2)) // 2:]
    
    return head == tail[::-1]

if is_kaibun(s) and is_kaibun(s[:(n-1)//2]) and is_kaibun(s[(n+3)//2-1:]):
    print("Yes")
else:
    print("No")


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = input()
n = len(s)

t = s[:(n-1)//2]
u = s[(n+3)//2:]

if (s == s[::-1]
    and len(t) > 0
    and len(u) > 0
    and t == t[::-1]
    and u == u[::-1]):
  print('Yes')
else:
  print('No')
  


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

s = input()
n = len(s)

t = s[:(n-1)//2]
u = s[(n+3)//2:]

if (s == s[::-1]
    and len(t) > 0 and len(u) > 0 and
    and t == t[::-1]
    and u == u[::-1]):
  print('Yes')
else:
  print('No')
  


s = input()
n = len(s)

t = s[:(n-1)//2]
u = s[(n+3)//2:]

if (s == s[::-1]
    and t == t[::-1]
    and u == u[::-1]):
  print('Yes')
else:
  print('No')
  


s = input()
n = len(s)

t = s[:(n-1)//2]
u = s[(n+3)//2-1:]

if (s == s[::-1]
    and t == t[::-1]
    and u == u[::-1]):
  print('Yes')
else:
  print('No')
  


Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
def kaibunCheck(s):
  flag = True
    n = len(s)
    for i in range((n + 1) // 2):
      if s[i] != s[(i + 1) * (-1)]:
        flag = False
    
  return flag
        
S = input()
N = len(S)

S1 = S[:(N - 1) // 2]
S2 = S[(N + 1) // 2 :]

if kaibunCheck(S) == True and kaibunCheck(S1) == True and kaibunCheck(S2) == True:
  print("Yes")
else:
  print("No")

def kaibunCheck(s):
  flag = True
  n = len(s)
  for i in range((n + 1) // 2):
    if s[i] != s[(i + 1) * (-1)]:
      flag = False

  return flag
        
S = input()
N = len(S)

S1 = S[:(N - 1) // 2]
S2 = S[(N + 1) // 2 :]

if kaibunCheck(S) == True and kaibunCheck(S1) == True and kaibunCheck(S2) == True:
  print("Yes")
else:
  print("No")

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
s=input()
flag=True
n=len(s)
if s!=s.reversed():
    flag=False
if s[:(n-1)/2]!=s[:(n-1)/2].reversed():
    flag=False
if s[(n+3)/2-1:]!=s[(n+3)/2-1:].reversed():
    flag=False
print("Yes" if flag else "No")




s=input()
flag=True
n=len(s)
if s!=s[::-1]:
    print(reversed(s))
    flag=False
if s[:(n-1)//2]!=s[-1:(n-1)//2:-1]:
    print(reversed(s[:(n-1)//2]))
    flag=False
if s[(n+3)//2-1:]!=s[-1:(n+3)//2-1:-1]:
    print(reversed(s[(n+3)//2-1:]))
    flag=False
print("Yes" if flag else "No")


s=input()
flag=True
n=len(s)
if s!=reversed(s):
    flag=False
if s[:(n-1)//2]!=reversed(s[:(n-1)//2]):
    flag=False
if s[(n+3)//2-1:]!=reversed(s[(n+3)//2-1:]):
    flag=False
print("Yes" if flag else "No")


s=input()
flag=True
n=len(s)
if s!=s.reversed():
    flag=False
if s[:(n-1)/2]!=s[:(n-1)/2:-1]:
    flag=False
if s[(n+3)/2-1:]!=s[(n+3)/2-1::-1]:
    flag=False
print("Yes" if flag else "No")



s=input()
a=s
s=a
flag=True
n=len(s)
if s!=s.reversed():
    flag=False
if s[:(n-1)/2]!=s[:(n-1)/2].reversed():
    flag=False
if s[(n+3)/2-1:]!=s[(n+3)/2-1:].reversed():
    flag=False
print("Yes" if flag else "No")



s=str(input())
flag=True
n=len(s)
if s!=s.reversed():
    flag=False
if s[:(n-1)/2]!=s[:(n-1)/2].reversed():
    flag=False
if s[(n+3)/2-1:]!=s[(n+3)/2-1:].reversed():
    flag=False
print("Yes" if flag else "No")



s=input()
flag=True
n=len(s)
if s!=reversed(s):
    flag=False
if s[:(n-1)/2]!=reversed(s[:(n-1)/2]):
    flag=False
if s[(n+3)/2-1:]!=reversed(s[(n+3)/2-1::-1]):
    flag=False
print("Yes" if flag else "No")


s=input()
flag=True
n=len(s)
if s!=reversed(s):
    flag=False
if s[:(n-1)//2]!=reversed(s[:(n-1)//2]):
    flag=False
if s[(n+3)//2-1:]!=reversed(s[(n+3)//2-1::-1]):
    flag=False
print("Yes" if flag else "No")



s=input()
flag=True
n=len(s)
if s!=s[::-1]:
    flag=False
if s[:(n-1)//2]!="".join(list(reversed(s[:(n-1)//2]))):
    flag=False
if s[(n+3)//2-1:]!="".join(list(reversed(s[(n+3)//2-1:]))):
    flag=False
print("Yes" if flag else "No")

Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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')

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()
for i in range(int(n/2)):
    if s[i:(i+1)] != s[(n-i-1):n-i]:
        print('No')
        sys.exit()  
print('Yes')

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
def kaibun(s):
    n = len(s)
    if n%2==0:
        S1 = s[:n//2]
        S2 = s[n//2:]
        for i in range(n//2):
            if S1[i]!=S2[i]:
                return False
        return True
    else:
        S1 = s[:n//2]
        S2 = s[n//2+1:]
        for i in range(n//2-1):
            if S1[i]!=S2[i]:
                return False
        return True
        
S = input()
# print(len(S))
s1 = S[:int((len(S)-1)/2)+1]
s2 = S[int((len(S)+3)/2)-1:]

s_b = kaibun(S)
s1_b = kaibun(s1)
s2_b = kaibun(s2)

if (s_b and s1_b and s2_b):
    print("Yes")
else:
    print("No")


# coding: utf-8
# Your code here!
def kaibun(s):
    n = len(s)
    if n%2==0:
        s1 = s[:n//2]
        s2 = s[n//2:]
    else:
        s1 = s[:(n-1)//2]
        s2 = s[((n-1)//2)+1:]
    
    m = len(s1)
    for i in range(m):
        if s1[i]!=s2[m-i-1]:
            return False
    return True
    
S = input()
N = len(S)
S1 = S[:(N-1)//2]
S2 = S[(N+3)//2-1:]

b1 = kaibun(S)
b2 = kaibun(S1)
b3 = kaibun(S2)

if b1 and b2 and b3:
    print("Yes")
else:
    print("No")

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = input()
n = len(s)
for i in range((n//2)):
  if(s[i] != s[-(i+1)]):
    print("No")
    exit()
for i in range(((n//2)//2)):
  print(s[i],s[((n//2)-1)-i])
  if((s[i] != s[((n//2)-1)-i]) and s[((n+3)/2) != s[-(i+1)]]):
    print("No")
    exit()
print("Yes")

s = input()
n = len(s)
for i in range((n//2)):
  if(s[i] != s[-(i+1)]):
    print("No")
    exit()
for i in range(((n//2)//2)):
  if((s[i] != s[((n//2)-1)-i]) and (s[((n+3)/2) != s[-(i+1)]])):
    print("No")
    exit()
print("Yes")

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = input()
s_len = len(s)
s1 = s[0:int((s_len - 1) / 2)]
s2 = s[int((s_len + 3) / 2) - 1:s_len]

print(s1)
print(s2)

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


s = input()
s_len = len(s)
s1 = s[0:int((s_len - 1) / 2)]
s2 = s[int((s_len + 3) / 2) - 1:s_len]
if s1 == s1[::-1] and s2 == s2[::-1] and s == s[::-1]:
    print('Yes')
else:
    print('No')


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = input()
n = s.size()
ans=""
 
half = s[0:(n-1)/2]
 
if s==s[::-1] and half==half[::-1]:
	ans = "Yes"
else:
	ans = "No"
  
print(ans)

s = input()
n = s.size()
ans=""
 
half = s[0:(n-1)/2]
 
if(s==s[::-1] && half==half[::-1]){
	ans = "Yes";
}
else
	ans = "No";
  
print(ans)
}

s = input()
n = len(s)
ans=""
 
half = s[:int((n-1)/2)]
 
if s==s[::-1] and half==half[::-1]:
	ans = "Yes"
else:
	ans = "No"
  
print(ans)



Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
a = input();
cnt = 0;
if(a == a[::-1]):
	cnt+=1
n = len(a)
if(a[:(n-1)//2] == a[:(n-1)//2:-1):
    cnt+=1
if(a[(n+3)//2::-1] == a[(n+3)//2:]):
    cnt+=1
if(cnt == 3):
    print("Yes")
else:
   	print("No")

a = input();
cnt = 0;
if(a == a[::-1]):
	cnt+=1
n = len(a)
if(a[:(n-1)//2] == a[:(n-1)//2:-1]):
    cnt+=1
if(a[(n+3)//2::-1] == a[(n+3)//2:]):
    cnt+=1
if(cnt == 3):
    print("Yes")
else:
   	print("No")


a = input();
cnt = 0;
if(a == a[::-1]):
	cnt+=1
n = len(a)
if(a[:(n-1)//2] == a[:(n-1)//2:-1]):
    cnt+=1
if(a[(n+3)//2-1::][::-1] == a[(n+3)//2-1:]):
    cnt+=1
if(cnt == 3):
    print("Yes")
else:
   	print("No")


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import sys

S=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")

import sys

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")


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s=input().strip();	n=len(S)
print("Yes" if s==s[::-1] and s[:(n-1)//2]==s[:(n-1)//2][::-1] and s[(n+3)//2-1:]==s[(n+3)//2-1:][::-1] else "No")

s=input().strip();	n=len(s)
print("Yes" if s==s[::-1] and s[:(n-1)//2]==s[:(n-1)//2][::-1] and s[(n+3)//2-1:]==s[(n+3)//2-1:][::-1] else "No")

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
s=input()
n=len(s)
flag=0


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

if v==((n-1)//2)
    print("Yes")
else:
    print("No")

def kaibun(s):
    for _ in range(n//2):
        if s[_]==s[n-_-1]:
            continue
        else:
            return False
    return True

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

s=input()
n=len(s)
flag=0


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

if flag==((n-1)//2):
    print("Yes")
else:
    print("No")

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
str = input()

str1 = str[::-1]
a = str1 == str
str2 = str[:int((len(str)-1)/2)]
str3 = str2[::-1]
b = str3 == str2
str4 = str[int((len(str)+3)/2)-1:]
str5 = str4[::-1]
c = str5 == str4
print(a, b, c)
if a and b and c:
    print("Yes")
else:
    print("No")

str = input()

str1 = str[::-1]
a = str1 == str
str2 = str[:int((len(str)-1)/2)]
str3 = str2[::-1]
b = str3 == str2
str4 = str[int((len(str)+3)/2)-1:]
str5 = str4[::-1]
c = str5 == str4
if a and b and c:
    print("Yes")
else:
    print("No")

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):

n, m = map(int, input().split())
import math
def comb(n, r):
	return math.factorial(s) // (math.factorial(s - r) * math.factorial(s))
print (comb(n,2) + comb(m,2))

s = input()
n = len(s)
if s != s[::-1]:
	print ("No")
	exit()
if s[:n//2] != s[:n//2][::-1]:
	print ("No")
	exit()
if s[(n+3)//2-1:] != s[(n+3)//2-1:][::-1]:
	print ("No")
	exit()
print ("Yes")

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
string = input()

middle=len(string)//2

def isPal(string):
    return string==string[::-1]

if isPal(string):
    if isPal(string[:middle]):
        print(True)
    else:
        print(False)
else:
    print(False)

import sys
inpt = sys.stdin.readline()

stp=len(inpt)//2
scnd_str=stp+1

frst=inpt[:stp]
scnd=inpt[scnd_str:]

if frst!=scnd:
    print("No")
else:
    print("Yes")

import sys
inpt = sys.stdin.readline()
frst_stp=(len(inpt)-1)//2
stp=frst_stp+1
scnd_stp=frst_stp+2
frst=[]
scnd=[]

for number,i in enumerate(inpt):
    index=number+1
    if index<=frst_stp:
        frst.append(i)
    elif index==stp:
        pass
    else:
        scnd.append(i)

if "".join(frst)=="".join(scnd):
    print("Yes")
else:
    print("No")

string = input()

middle=len(string)//2

def isPal(string):
    return string==string[::-1]

if isPal(string):
    if isPal(string[:middle]):
        print("True")
    else:
        print("False")
else:
    print("False")

string = input()

middle=len(string)//2

def isPal(string):
    return string==string[::-1]

if isPal(string):
    if isPal(string[:middle]):
        print("Yes")
    else:
        print("No")
else:
    print("No")

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s=input()
sl=len(s)
if s[:(sl-1)/2]==s[((sl+3)/2)-1:]:
    print('Yes')
else :
    print('No')


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


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

s = input()

if s[0] == s[-1] and s[1] == s[-2] and s[2] == s[-3] and s[0] == s[1]:
    print('Yes')
else:
    print('No')

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

s = input()
c = 0
for i in range((len(s) - 1)// 2):
    if s[i] == s[-1 - i] and s[i] == s[(len(s) - 1)// 2 - 1 - i]:
        pass
    else:
        c += 1
        break

if c == 0:
    print('Yes')
else:
    print('No')

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 19 11:55:12 2020

@author: 17664
"""
kaibun = input()
joken1 = kaibun[:(len(kaibun)-1)//2]

joken2 = kaibun[(len(kaibun)+2)//2:]


ans = 'yes'

if kaibun != kaibun[::-1]:
    ans = 'no'
if joken1 != joken1[::-1]:
    ans = 'no'
if joken2 != joken2[::-1]:
    ans = 'no'
    
print(ans)

# -*- coding: utf-8 -*-
"""
Created on Thu Mar 19 11:55:12 2020

@author: 17664
"""
kaibun = input()
joken1 = kaibun[:(len(kaibun)-1)//2]

joken2 = kaibun[(len(kaibun)+2)//2:]


ans = 'no'

if kaibun == kaibun[::-1] and joken1 == joken1[::-1] and joken2 == joken2[::-1]:
    ans = 'yes'
    
print(ans)

# -*- coding: utf-8 -*-
"""
Created on Thu Mar 19 11:55:12 2020

@author: 17664
"""
kaibun = input()
joken1 = kaibun[:(len(kaibun)-1)//2]

joken2 = kaibun[(len(kaibun)+2)//2:]


ans = 'No'

if kaibun == kaibun[::-1] and joken1 == joken1[::-1] and joken2 == joken2[::-1]:
    ans = 'Yes'
    
print(ans)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s=input()
n=len(s)
if s==s[::-1]:
  if s[0:n//2]==s[0:n//2:-1]:
    if s[n//2+2:n]==s[n//2+2:n:-1]:
      print("Yes")
      exit()
print("No")

s=input()
n=len(s)
s1=s[0:n//2]
s2=s[n//2+1:n]
if s=s[::-1]and s1=s1[::-1] and s2=s2[::-1]: print("Yes")
else: print("No")

s=input()
n=len(s)
s1=s[0:n//2]
s2=s[n//2+1:n]
if s==s[::-1]and s1==s1[::-1] and s2==s2[::-1]: print("Yes")
else: print("No")

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
def kaibun(mojiretu):
    leg = len(mojiretu)
    mid = (leg-1) /2
    for i in range(mid):
        if mojiretu[i] != mojiretu[(mid+1)+i]:
            return False
    return True

input_line = input()
if not kaibun(input_line):
    print('No')
    quit()

mid = (leg-1) /2
if not kaibun(input_line[0:mid]):
    print('No')
    quit()

if not kaibun(input_line[mid+1:]):
    print('No')
    quit()

def fin():
    print('No')
    quit()

input_line = input()
if not input_line == input_line[::-1]:
    fin()

N = len(input_line)
new_str = input_line[0:(N-1)//2]
if not new_str == new_str[::-1]:
    fin()

print('Yes')

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
print((n/3)**3)

s = input()
n = len(s)
ss = s[:(n - 1) // 2]
sss = s[(n + 3) // 2 - 1:]
flag = True;
for i in range(len(s)//2):
    if s[i] != s[n - 1 - i]:
        flag = False
if not flag:
    print("No")
    exit()

for i in range(len(ss)//2):
    if ss[i] != ss[len(ss) - 1 - i]:
        flag = False
if not flag:
    print("No")
    exit()

for i in range(len(sss)//2):
    if sss[i] != sss[len(sss) - 1 - i]:
        flag = False
if not flag:
    print("No")
    exit()
print("Yes")


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
def judge(s):
    n = len(s)
    check = 0
    for i in range(n):
        check = int(s[i]!=s[-1-i])
        
    n2 = n//2
    for i in range(n2):
        check = int(s[i] != s[n2 - i])
       
    n3 = (n+1)//2
    for i in range(n3):
        check = int(s[n3] != s[-1-i])
        
    if check >0:
        print("No")
    else:
        print("Yes")

s = list(input())
judge(s)

s = list(input())
judge = 0
n = len(s)
if s != s[-1::-1]:
    judge +=1

if s[0:(n-1)//2] != s[(n-3)//2::-1]:
    judge +=1

if s[(n+1)//2:n] != s[n-1:(n-1)//2:-1]:
    judge +=1

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
S = input()
N = len(S)
temp = S[0:(N-1)/2]
temp2 = S[(N+2)/2:N]
print("Yes") if temp == temp[::-1] and temp2 == temp2[::-1] else "No"

S = input()
S=str(S)
N = len(S)
temp = S[0:(N-1)/2]
temp2 = S[(N+2)/2:N]
print("Yes") if temp == temp[::-1] and temp2 == temp2[::-1] else "No"

S = input()
N = len(str(S))
temp = S[0:(N-1)/2]
temp2 = S[(N+2)/2:N]
print("Yes") if temp == temp[::-1] and temp2 == temp2[::-1] else "No"

s = input()
if s == s[::-1]:
    flag = True
else:
    flag = False
N = len(s)
if flag:
    new = s[0:int((N-1)/2)]
    if new == new[::-1]:
        flag = True
    else: flag = False

if flag:
    new = s[int((N+2)/2):N]
    if new == new[::-1]:
        flag = True
    else:
        flag = False

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
S = list(str(input()))
print(S[-3:], S[:3])
if S == list(reversed(S)) and S[-3:] == list(reversed(S[-3:])) and S[:3] == list(reversed(S[:3])):
  print("Yes")
else:
  print("No")

S = list(str(input()))

req1 = int((len(S) - 1) / 2) + 1
req2 = int((len(S) + 3) / 2) - 2
if S == list(reversed(S)) and S[req1:] == list(reversed(S[req1:])) and S[req2:] == list(reversed(S[req2:])):
  print("Yes")
else:
  print("No")

S = list(str(input()))

req1 = int((len(S) - 1) / 2)
req2 = int((len(S) + 3) / 2) - 1
if S == list(reversed(S)) and S[:req1] == list(reversed(S[:req1])) and S[req2:] == list(reversed(S[req2:])):
  print("Yes")
else:
  print("No")

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
S = input()
k1 = ''
k2 = ''
for i in range(0,(len(S) - 1) // 2):
  k1 += S[i]
for i in range(((len(S) + 3) // 2) - 1, len(S)):
  k2 += S[i]
print(k1)
print(k2)
if k1 == k1[::-1] and k2 == k2[::-1] and 3 <= len(S) <= 99:
  print('Yes')
else:
  print('No')

S = input()
k1 = ''
k2 = ''
for i in range(0,(len(S) - 1) // 2):
  k1 += S[i]
for j in range(((len(S) + 3) // 2) - 1, len(S)):
  k2 += S[j]
if k1 == k1[::-1] and k2 == k2[::-1] and 3 <= len(S) <= 99 and len(S) % 2 == 1 and S == S[::-1]:
  print('Yes')
else:
  print('No')
#print(k2)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
S = input()
def kaibun_check(bun):
    if bun == bun[::-1]
        return True
    else:
        return False
if kaibun_check(S):
    if kaibun_check(S[:len(S)/2]):
        print(Yes)
    else:
        print(No)
else:
    print(No)

S = input()
def kaibun_check(bun):
    if bun == bun[::-1]:
        return True
    else:
        return False
if kaibun_check(S):
    idx = int((len(S) -1)/2)
    if kaibun_check(S[:idx]):
        print("Yes")
    else:
        print("No")
else:
    print("No")

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
s=input()
n=len(s)
s1=s[0:(n-1)/2]
s2=s[(n+1)/2:n]
if s==s[::-1] and s1==s1[::-1] and s2==s2[::-1]:
  print("Yes")
else:
  print("No")

s=input()
n=len(s)
s1=s[0:(n-3)/2]
s2=s[(n+1)/2:n-1]
if s==s[::-1] and s1==s1[::-1] and s2==s2[::-1]:
  print("Yes")
else:
  print("No")

s=input()
n=len(s)
n1=(n-1)/2
n2=(n+1)/2
s1=s[0:n1]
s2=s[n2:n]
if s==s[::-1] and s1==s1[::-1] and s2==s2[::-1]:
  print("Yes")
else:
  print("No")

s=input()
n=len(s)
s1=s[0:(n-1)//2]
s2=s[(n+1)//2:n]
if s==s[::-1] and s1==s1[::-1] and s2==s2[::-1]:
  print("Yes")
else:
  print("No")


Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
def ispalindrome(str): return 1 if str == str[::-1] else 0
S = input()
N = len(S)

i1 = int((N-1)/2)
i2 = int((N+3)/2)-1
strong = True
print(S[:i1], S[i2:])
if not ispalindrome(S):
  strong = False
if not ispalindrome(S[:i1]):
  strong = False
if not ispalindrome(S[i2:]):
  strong = False

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

def ispalindrome(str): return 1 if str == str[::-1] else 0
S = input()
N = len(S)

i1 = int((N-1)/2)
i2 = int((N+3)/2)-1
strong = True
if not ispalindrome(S):
  strong = False
if not ispalindrome(S[:i1]):
  strong = False
if not ispalindrome(S[i2:]):
  strong = False

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = input()

def is_palindrome(s):
  n_str = (len(s) - 1) // 2
  return s[: n_str][::-1] == s[-n_str: ]

result = "Yes" if is_palindrome(s) and is_palindrome(s[: (len(s)-1)//2]) and is_palindrome(s[(len(s)+3)//2:]) else "No"
print(result)

s = input()

def is_palindrome(s):
  return s == s[::-1]

result = "Yes" if is_palindrome(s) and is_palindrome(s[: (len(s)-1)//2]) and is_palindrome(s[(len(s)+3)//2-1:]) else "No"
print(result)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
def palindrome(string): return 1 if string==string[::-1] else 0

kaibun=input()

N=len(kaibun)
A=kaibun[0:int((N-1)/2)]
B=kaibun[int((N+3)/2-1):int(N)]


if palindrome(A) & palindrome(B):
    print('YES')
else:
    print('NO')

def palindrome(string): return 1 if string==string[::-1] else 0

kaibun=input()

N=len(kaibun)
A=kaibun[0:int((N-1)/2)]
B=kaibun[int((N+3)/2-1):int(N)]


if palindrome(kaibun) & palindrome(A) & palindrome(B):
    print('Yes')
else:
    print('No')

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
def check(a):
  for i in range(int(len(a)/2)):
    if a[i]!=a[-(i+1)]:
       return False
  return True

S=input()
if kaibun(S):
  a=S[0:int(len(S)/2)]
  b=S[int(len(S)/2)+1:len(S)]
  if kaibun(a) and kaibun(b):
    print('Yes')
  else:
    print('No')
else:
    print('No')

def check(a):
  for i in range(int(len(a)/2)):
    if a[i]!=a[-(i+1)]:
       return False
  return True
 
S=input()
if check(S):
  a=S[0:int(len(S)/2)]
  b=S[int(len(S)/2)+1:len(S)]
  if check(a) and check(b):
    print('Yes')
  else:
    print('No')
else:
    print('No')

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
def kaibun(s):
    n=len(s)
    a=s[0:n//2]
    b=s[n//2:n]

    #return True
    #return False

s = input()
n = len(s)
if kaibun(s) and kaibun(s[0:(n-1)//2]) and kaibun(s[(n+3)//2-1:n]):
    print('Yes')
else:
    print('No')
    

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


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
def judge(s):
  for i in range(len(s)//2):
    if s[i]!=s[-(i+1)]:
      return False
  else:
    return True

s=input()
if judge(s)==False:
  print('No')
else:
  if judge(s[:(len(s)-1)//2])==False:
    print('No')
  else:
    if judge(s[(len(s)+3)//2:])==False:
      print('No')
    else:
      print('Yes')

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

s=input()
print(s[:(len(s)-1)//2],s[(len(s)+3)//2-1:])
if judge(s)==False:
  print('No')
else:
  if judge(s[:(len(s)-1)//2])==False:
    print('No')
  else:
    if judge(s[(len(s)+3)//2-1:])==False:
      print('No')
    else:
      print('Yes')

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

s=input()
if judge(s)==False:
  print('No')
else:
  if judge(s[:(len(s)-1)//2])==False:
    print('No')
  else:
    if judge(s[(len(s)+3)//2-1:])==False:
      print('No')
    else:
      print('Yes')

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
print("input")
S = input()
ch = list(S)
num = len(S)
n1 = int((num-1)/2)
result = str("Yes")
i = int(0)
j = int(0)
while i < n1:
    if ch[i] == ch[n1-1-i]:
        i = i+1
    else:
        result = str("No")
        break
if result == "Yes":
    while j < n1:
        if ch[num - n1+j] == ch[num - j-1]:
            j = j+1
        else:
            result = str("No")
            break
print(result)


S = input()
ch = list(S)
num = len(S)
n1 = int((num-1)/2)
result = str("Yes")
i = int(0)
j = int(0)
k = int(0)
while i < n1:
    if ch[i] == ch[n1-1-i]:
        i = i+1
    else:
        result = str("No")
        break
if result == "Yes":
    while j < n1:
        if ch[num - n1+j] == ch[num - j-1]:
            j = j+1
        else:
            result = str("No")
            break
if result == "Yes":
    while k < num:
        if ch[k] == ch[num-1-k]:
            k = k + 1
        else:
            result = str("No")
            break
print(result)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
S = input()
N = len(S)
Sd = S[:(N-1)//2]
Sdd = S[(N+1)//2:N]
print(Sd,Sdd)
if S == S[::-1] and Sd == Sd[::-1] and Sdd == Sdd[::-1]:
    print("Yes")
else:
    print("No")

S = input()
N = len(S)
Sd = S[:(N-1)//2]
Sdd = S[(N+1)//2:N]
if S == S[::-1] and Sd == Sd[::-1] and Sdd == Sdd[::-1]:
    print("Yes")
else:
    print("No")

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):

S = input()
N = len(S)

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



S = input()
N = len(S)

S1 = S[:(N-1)//2]
S2 = S[(N+3)//2 - 1:]

print("Yes" if S1 == sorted(S1)[::-1] and S2== sorted(S2)[::-1] else "No")



S = input()
N = len(S)

S1 = S[:(N-1)/2]
S2 = S[(N+3)/2:]

print("Yes" if S1 == sorted(S1)[::-1] and S2== sorted(S2)[::-1] else "No")



S = input()
N = len(S)

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



S = input()
N = len(S)

S1 = S[:(N-1)//2]
S2 = S[(N+3)//2 - 1:]

print("Yes" if S == S[::-1] and S1 == S1[::-1] and S2== S2[::-1] else "No")


Verdicts: Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
S = input()
N = len(S)
P = 0
for i in range (N-1//2):
    if S[i] == S[N-1-i]:
        for k in range(N-1//2):
            if S[k] == S[((N-1)//2)-k] and S[((N+1)//2)+k] == S[N-1-k]:
                P = P
            else:
                P += 1
        else:
            P += 1

if P == 0:
    print('Yes')
else:
    print('No')


S = input()
N = len(S)
P = 0
for i in range ((N-1)//2):
    if S[i] == S[N-1-i]:
        for k in range((N-1)//2):
            if S[k] == S[((N-3)//2)-k] and S[((N+1)//2)+k] == S[N-1-k]:
                P = P
            else:
                P += 1
    else:
        P += 1

if P == 0:
    print('Yes')
else:
    print('No')


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
class atcorder:
    
    S=list(input())
    inv=list(reversed(S))
    i=0
    j=0
    if S==inv:
        i+=1
        
    N=int((len(S)-1)/2)
    for x in range(N-1):
        if S[x]==S[N-1-x] and inv[x]==inv[N-1-x]:
            pass
        else:
            j+=1
                
    if j==0 and i==1:
        print('yes')
    else:
        print('no')

class atcorder:
    
    S=list(input())
    inv=list(reversed(S))
    i=0
    j=0
    if len(S)%2==0:
        pass
    else:
        if S==inv:
            i+=1
            N=int((len(S)-1)/2)
        for x in range(N-1):
            if S[x]==S[N-1-x] and inv[x]==inv[N-1-x]:
                pass
            else:
                j+=1
                
    if j==0 and i==1:
        print('yes')
    else:
        print('no')

class atcorder:
    
    S=list(input())
    inv=list(reversed(S))
    i=0
    j=0
    if len(S)%2==0:
        pass
    else:
        if S==inv:
            i+=1
            N=int((len(S)-1)/2)
        for x in range(N-1):
            if S[x]==S[N-1-x] and inv[x]==inv[N-1-x]:
                pass
            else:
                j+=1
                
    if j==0 and i==1:
        print('yes')
    else:
        print('no')
            

class atcorder:
    
    S=list(input())
    inv=list(reversed(S))
    i=0
    j=0
    if S==inv:
        i+=1
        
    N=int((len(S)-1)/2)
    for x in range(N-1):
        if S[x]==S[N-1-x] and inv[x]==inv[N-1-x]:
            pass
        else:
            j+=1
                
    if j==0 and i==1:
        print('Yes')
    else:
        print('No')

Verdicts: Wrong Answer

Runtime Error

Runtime Error

Accepted