Problem:


Score : 200 points

Problem Statement

Given are a positive integer N and a string S of length N consisting of lowercase English letters.

Determine whether the string is a concatenation of two copies of some string.
That is, determine whether there is a string T such that S = T + T.

Constraints

1 \leq N \leq 100

S consists of lowercase English letters.

|S| = N

Input

Input is given from Standard Input in the following format:

N
S

Output

If S is a concatenation of two copies of some string, print Yes; otherwise, print No.

Sample Input 1

6
abcabc

Sample Output 1

Yes

Let T =  abc, and S = T + T.

Sample Input 2

6
abcadc

Sample Output 2

No

Sample Input 3

1
z

Sample Output 3

No



Sample input:
6
abcabc


Sample output:
Yes

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
def main():
    inNumber = input()
    try:
        wk_inNumber = int(inNumber)
    except Exception as e:
        print('No')
        return 0
    if wk_inNumber > 100:
        print('No')
        return 0

    inStr = input()
    if inStr.islower() == False:
        print('No')
        return 0

    charInstr = list(inStr)

    if wk_inNumber % 2 == 1:
        print('No')
        return 0

    if wk_inNumber != len(charInstr):
       print('No')
       return 0

    i = 0
    while i < wk_inNumber / 2 :
        j = int(wk_inNumber / 2 + i)
        if charInstr[i] != charInstr[j]:
            print(i)
            print(charInstr[i])
            print('No')
            return 0
        i += 1

    print('Yes')


main()

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input()
if(n%2!=0):
  print("No")
else:
  if(s[:int(n/2)]==s[int(n/2):]):
    print("Yes")

Submission status: Wrong Answer

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

import re

def nchars(s, n):
    """文字列 s に、同じ文字が n 個以上連続している部分文字列を見つける
    """
    assert n > 0
    reg = re.compile("(.)\\1{%d,}" % (n - 1))  # カンマを取ると n 個ちょうどになる
    while True:
        m = reg.search(s)
        if not m:
            break
        yield m.group(0)
        s = s[m.end():]

print(list(nchars(S, 2)))

Submission status: Wrong Answer

Solution code:
def judge1(Num,a):
    if Num%2 == 0:
        j = int(Num/2 - 1)
        b = []
        for i in range(j+1):
            b.append(a[i])
        c = b + b
        alpha = "".join(c)
        if alpha == a:
            print("yes")
        else:
            print("No")
    else:
        print("No")

N = int(input())
S = input()

judge1(N,S)

Submission status: Wrong Answer

Solution code:
N=int(input())
S=str(input())
for i in range(N):
  for j in range(i,N):
    if S[i:j+1]*2 in S:
      print('Yes')
      exit()
print('No')

Submission status: Wrong Answer

Solution code:
length = int(input())
str_ls = list(map(str, input().split()))
num = int(length / 2)
ls_1 = str_ls[:num]
ls_2 = str_ls[num:]
if length == 1:
    print('No')
elif ls_1 == ls_2:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
S = input()
n = N//2
s = S[0:n]
sa =S[n:N]
if N==2:
  print('no')
elif not N%2==0:
  print('No')
elif s==sa:
    print('yes')
else:
    print('no')

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(int(1e6))

N = int(input())
S = input()

if N % 2:
    print('No')
    exit()

n = int(N / 2)
if S[0:n-1] == S[n:N-1]:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
def main():
    inNumber = input()
    try:
        wk_inNumber = int(inNumber)
    except Exception as e:
        print('整数値を入力してください')
        return 0
    if wk_inNumber > 100:
        print('100文字オーバー')
        return 0

    inStr = input()
    if inStr.islower() == False:
        print('英小文字を入力')
        return 0

    charInstr = list(inStr)


    if wk_inNumber != len(charInstr):
       print('No')
       return 0

    i = 0
    while i < wk_inNumber / 2 :
        j = int(wk_inNumber / 2 + i)
        if charInstr[i] != charInstr[j]:
            print('No')
            return 0
        i += 1

    print('Yes')


main()

Submission status: Wrong Answer

Solution code:
length = int(input())
str_ls = list(map(str, input().split()))
num = int(length / 2)
ls_1 = str_ls[:num]
ls_2 = str_ls[num:]
if length == 1:
    print('No')
elif ls_1 != ls_2:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
def judge1(Num,a):
    if Num%2 == 0:
        j = int(Num/2 - 1)
        b = []
        for i in range(j+1):
            b.append(a[i])
        c = b + b
        alpha = "".join(c)
        if alpha == a:
            print("yes")
        else:
            print("No")
    else:
        print("No")

N = int(input())
S = str(input())

judge1(N,S)

Submission status: Wrong Answer

Solution code:
N=int(input())
S=str(input())
for i in range(N):
  for j in range(i,N+1):
    if S[i:j+1]*2 in S:
      print('Yes')
      exit()
print('No')

Submission status: Wrong Answer

Solution code:
N=int(input())
S=str(input())
for i in range(N):
  for j in range(i+1,N+1):
    if S[i:j+1]*2 in S:
      print('Yes')
      exit()
print('No')

Submission status: Wrong Answer

Solution code:
n=int(input())
s=list(input())
if n==0:
    print("No")
else:
    if n%2==0:
        s=set(s)
        if len(s)==n/2:
            print("Yes")
        else:
            if len(s)==1:
                print("Yes")
            else:
                print("No")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
import sys

input = sys.stdin.readline

N = int(input())
S = input().rstrip()

if N % 2 != 0:
    print('No')
else:
    mid = int(N / 2)
    head = S[:mid]
    S2 = head + head
    print(S)
    print(S2)
    if S == S2:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

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

if N % 2 == 0 and S[0:round(N / 2)] == S[round(N / 2) + 1:N]:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
length = int(input())
str_ls = list(map(str, input().split()))
num = int(length / 2)
ls_1 = str_ls[:num]
ls_2 = str_ls[num:]
if ls_1 != ls_2:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
N, S = input(), input()
N = int(N)
S = S.strip()
if N % 2 == 1:
  print("No")
if S[:N//2] == S[N//2:]:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline

#input
N = int(input())
S = str(input())

#output
if N % 2 == 1:
    print("No")
else:
    M = int(N/2)
    if S[:M] == S[M:]:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
N=int(input())
S=str(input())
for i in range(N-1):
  for j in range(i+1,N+1):
    if S[i:j+1]*2 in S:
      print('Yes')
      exit()
print('No')

Submission status: Wrong Answer

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

if N % 2 == 0 and S[0:round(N / 2)] == S[round(N / 2) + 1:N - 1]:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N, S = input(), input()
N = int(N)
S = S.strip()
if N % 2 == 1:
  print("No")
if S[:N//2] == S[N//2:]:
  print("Yes")

Submission status: Wrong Answer

Solution code:
import sys
INPUT = sys.stdin.readline
#入力関数
def SORO_INT(): return int(INPUT())
def MULT_INT_LIST(): return list(map(int, INPUT().split()))
def MULT_INT_MAP(): return map(int, INPUT().split())
def SORO_STRING(): return INPUT()
def MULT_STRING(): return INPUT().split()

N = SORO_INT()
S = SORO_STRING()

if N%2==0:
    N = int(N)
else:
    print('No')
    sys.exit()
N_h = N//2
S_1 = S[:N_h]
#print(S_1)
S_2 = S[N_h:]
#print(S_2)
if S_1 == S_2:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
S = str(input())
ans = 'No'
if N > 3:
    
    t = int(N / 2)
    T0 = S[0: t]
    T1 = T0 + T0
    if T1 == S:
        ans = 'Yes'
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
s=input()
total=0

if n%2==0:
  
  for i in range(int(n/2)):   
    if s[i]==s[i+int(n/2)]:
      total+=1
  
  if total==int(n/2):
    print('Yes')
  else:
    print('N0')

else:
  print('No')

Submission status: Wrong Answer

Solution code:
a = int(input())
b = input()
count =int(a/2)
bf = b[:count]
bb = b[count:]
if a %2==0 and bf == bb:
    print('yes')
else:
    print('no')

Submission status: Wrong Answer

Solution code:
data_len = int(input())
data = input()
if data[0:int(data_len / 2)] == data[int(data_len / 2):data_len]:
    print("true")
else:
    print("false")

Submission status: Wrong Answer

Solution code:
N=int(input())
s=input()
if N%2==1:
 print("No")
else:
 r=int(N/2)
 if s[0:r-1]==s[r:N-1]:
  print("Yes")
 else:
  print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
s=list(input())
if n%2==0:
    s=set(s)
    if len(s)==n/2:
        print("Yes")
    else:
        if len(s)==1:
            print("Yes")
        else:
            print("No")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
def main():
    inNumber = input()

    try:
        wk_inNumber = int(inNumber[0])
    except Exception as e:
        print('No')
        return 0
    if wk_inNumber > 100:
        print('No')
        return 0

    inStr = input()
    if inStr.islower() == False:
        print('No')
        return 0

    charInstr = list(inStr)

    if wk_inNumber % 2 == 1:
        print('No')
        return 0

    if wk_inNumber != len(charInstr):
       print('No')
       return 0

    i = 0
    while i < wk_inNumber / 2 :
        j = int(wk_inNumber / 2 + i)
        if charInstr[i] != charInstr[j]:
            print('No')
            return 0
        i += 1

    print('Yes')


main()

Submission status: Wrong Answer

Solution code:
i = int(input()) 
s = input()
if i >= 1 and 100 >= i and i % 2 == 0 and i == len(s) and s.isalpha() and s.islower():
  n = (int)(i/2)
  t_0 = s[0]
  t_1 = s[n]
  for j in range(1, n):
    t_0 += s[j]
  for k in range(n + 1, i):
    t_1 += s[k]
  if t_0 == t_1:
    print("Yes")
  else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = input()
S = S.strip()

if len(S) % 2 == 1:
  print("No")
  
if S[:len(S)//2] == S[len(S)//2:]:
  print("Yes")

Submission status: Wrong Answer

Solution code:
n=int(input())
s=list(input())
if n%2==0:
    s=set(s)
    if len(s)==n/2:
        print("Yes")
    else:
        if len(s)==1:
            print(s)
        else:
            print("No")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
S = input()
check = False
for mojisu in range(1, N//2 + 1):
    for start in range(N-mojisu):
        if S[start:start+mojisu] == S[start+mojisu:start+mojisu+mojisu]:
            check = True

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

Submission status: Wrong Answer

Solution code:
N=int(input())
S=str(input())
for i in range(N-1):
  for j in range(i+1,N):
    if S[i:j+1]*2 in S:
      print('Yes')
      exit()
print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
S = str(input())
ans = 'No'
if N > 3:
    if N % 2 == 0:
        t = int(N / 2)
        T0 = S[0: t]
        T1 = S[t:]
        if T0 == T1:
            ans = 'Yes'
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
s=input()
t=s[0:len(set(s))]
if s.count(t)==2:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

if N%2 != 0:
    print("No")
else:
    S1 = S[0:int(N/2)-1]
    S2 = S[int(N/2):int(N-1)]
    if S1 == S2:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

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

if N % 2 != 0:
    print("no")
elif S[:N // 2] == S[N // 2:]:
    print("yes")
else:
    print("no")

Submission status: Wrong Answer

Solution code:
n = int(input())
s = list(input())

def string_match(str):
    length = len(str)
    half = length//2
    fore_str = str[0:half]
    aft_str = str[half:]
    flg = True
    for i in range(0, half):
        if fore_str[i] != aft_str[i]:
            flg = False
    return flg


if n == 1:
    flg = False
else:
    flg = string_match(s)

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

Submission status: Wrong Answer

Solution code:
N=int(input())
S=str(input())
for i in range(N):
  for j in range(i+1,N):
    if S[i:j+1]*2 in S:
      print('Yes')
      exit()
print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
S = str(input())
if N % 2 == 1:
  print("No")
#int(M) = N/2
if S[:int(N/2)] == S[int(N/2):N]:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N=int(input())
S=input()
if S[:(N//2)]==S:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
n=int(input())
s=list(input())
if n%2==0:
    s=set(s)
    if len(s)==n/2:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
def main():
    inNumber = input()

    try:
        wk_inNumber = int(inNumber[0])
    except Exception as e:
        print('整数値を入力してください')
        return 0
    if wk_inNumber > 100:
        print('100文字オーバー')
        return 0

    inStr = input()
    if inStr.islower() == False:
        print('英小文字を入力')
        return 0

    charInstr = list(inStr)

    if wk_inNumber % 2 == 1:
        print('No')
        return 0

    if wk_inNumber != len(charInstr):
       print('No')
       return 0

    i = 0
    while i < wk_inNumber / 2 :
        j = int(wk_inNumber / 2 + i)
        if charInstr[i] != charInstr[j]:
            print('No')
            return 0
        i += 1

    print('Yes')


main()

Submission status: Wrong Answer

Solution code:
N = int(input())
S = str(input())
ans = 'No'
if N > 3:
    t = int(N / 2)
    T0 = S[0: t]
    T1 = S[t:]
    if T0 == T1:
        ans = 'Yes'
print(ans)

Submission status: Wrong Answer

Solution code:
import numpy as np

N = int(input())
S = list(input())

if len(S) % 2 == 1:
  print('NO')
else:
  array = np.array(S).reshape(2, int(N/2))
  array1 = array[0]
  array2 = array[1]
  # Trueが1、Falseが0
  C = np.sum(array1 == array2)
  if C == int(N/2):
    print('YES')
  else:
    print('NO')

Submission status: Wrong Answer

Solution code:
N=int(input())
S=input()
ans="NO"
if(N<2):
  ans="NO"
elif(N%2!=0):
  ans="NO"
else:
  middle = N/2
  T=S[0:int(N/2)]
  if(S==T+T):
    ans ="YES"
print(ans)

Submission status: Wrong Answer

Solution code:
a = int(input())
b = input()
count =int(a/2)
bf = b[:count]
bb = b[count:]
if bf == bb:
    print('yes')
else:
    print('no')

Submission status: Wrong Answer

Solution code:
N=int(input())
S=input()
ans="NO"
if(N<2):
  ans="NO"
elif(N%2!=0):
  ans="NO"
else:
  T=S[0:int(N/2)]
  T2=S[int(N/2):]
  if(S==T+T2):
    ans ="YES"
print(ans)

Submission status: Wrong Answer

Solution code:
a = int(input())
b = input()
if len(b) % 2 == 0:
  if b[0:int(a / 2)] == b[int(a / 2):a]:
    print("Yes")
  else:
    pass
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N = input()
if len(N)%2==1:
  print("No")
else:
  if N[:int(len(N)/2)] ==N[int(len(N)/2):]:
    print("Yes")
  else:
    print("No")

Submission status: Wrong Answer

Solution code:
b=list(input().encode("ascii"))
if(len(b) % 2 == 1):
  print('No')
else:
  c=0
  a=len(b)//2
  for i in range(0,a):
    if(b[i]!=b[i+a]):
        c=c+1
  if(c==0):    
   print('Yes')
  else:
    print('No')

Submission status: Wrong Answer

Solution code:
N=int(input())
S=input()
ans="NO"
if(N<2):
  ans="NO"
elif(N%2!=0):
  ans="NO"
else:
  middle = N/2
  T=S[0:int(N/2)]
  T2=S[int(N/2):]
  if(S==T+T2):
    ans ="YES"
print(ans)

Submission status: Wrong Answer

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

if(int(n)%2 != 0 or len(s) != n):
    print("No")
    exit()

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

if(s1 == s2):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import collections

n = int(input())
s = input()

res = []

if n%2 is not 0:
  print('No')
if n%2 == 0:
  tl = s[0:(n//2)]
  t_list = list(tl)
  
  c = collections.Counter(s)
  for ll in t_list:
    if c[ll] == 2:
      res.append(True)
  
  if len(res) == len(t_list):
    print('Yes')
  else:
    print('No')

Submission status: Wrong Answer

Solution code:
n=int(input())
s=list(input())
if n==len(s):
    s=set(s)
    if len(s)==n/2:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N=int(input())
S=input()
cond=0
#print(S[0:3])

if N==1:
  print('No')
else:
  for n in range(N):
    if cond==1:
      break
    for j in range(N-(n+1)):
        if S[j:j+n+1]==S[j+n+1:j+2*n+2]:
#         print(n,S[j:j+n+1],S[j+n+1:j+2*n+2])
         cond=1
         print('Yes')
         break
  if cond==0:
    print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input()
sol = 0
 
for i in range(n // 2):
    
    if s[i - 1] == s[i - 1 + (n // 2)]:
        sol = sol + 1
 
if sol == n // 2:
    if n != 1:
        print("Yes")
    else:
        print("No")
 
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n=int(input())
li=list(input())
if n%2==0:
  t=int(n/2)
  print(t)
  a=li[:t]
  t=t-1
  b=li[:-t-1]
  if a==b:
    print('Yes')
  else:
    print('No')
else:
  print('No')

Submission status: Wrong Answer

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

res = False
for i in range(N-2):
	for j in range(i+2, N):
		t = S[i:j]
		if S.count(t) >= 2:
			res = True
			break

print('Yes' if res==True else 'No')

Submission status: Wrong Answer

Solution code:
##B
n = int(input())
s = str(input())

n1 = int(n/2)

if s == s[0:n1]+s[n1:n] and n % 2 == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import sys

input = sys.stdin.readline

N = int(input())
S = input()

if N % 2 != 0:
    print('No')
else:
    mid = int(N / 2)
    head = S[:mid]
    end = S[mid:]

    if head == end:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input()
if(n%2!=0):
  print("No")
else:
  s = set(s)
  if(len(s)==n/2):
    print("Yes")

Submission status: Wrong Answer

Solution code:
import sys
readline = sys.stdin.readline
N = int(readline())
S = readline()

if N%2==0:
  s1 = S[:(N//2)]
  if S == s1 + s1:
    print('Yes')
  else:
    print('No')
else:
  print('No')

Submission status: Wrong Answer

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

if n % 2 != 0:
    print('No')
else:
    t = s[0:int(n / 2 + 1)]
    if t + t == s:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
N=int(input())
S=input()
if N%2==1:
    print("No")
elif N==2:
    T1=S[0]
    T2=S[1]
    if S==T1+T2:
        print("Yes")
    else:
        print("No")
else:
    T1=S[0:(N//2)]
    T2=S[N//2:(N)]
    if S==T1+T2:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
t = str(input())

tLen = len(t)
tLenHalf = int(tLen / 2)

if (tLenHalf == 1):
	print("No")
else:
    if (t[:tLenHalf] == t[tLenHalf:]):
    	print("Yes")
    else:
    	print("No")

Submission status: Wrong Answer

Solution code:
n=int(input())
s=input()
k=n//2
ans="no"
for i in range(k):
    if s[i]==s[k+i]:
        ans='ok'
if ans=="ok":
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import sys
INPUT = sys.stdin.readline
#入力関数
def SORO_INT(): return int(INPUT())
def MULT_INT_LIST(): return list(map(int, INPUT().split()))
def MULT_INT_MAP(): return map(int, INPUT().split())
def SORO_STRING(): return INPUT()
def MULT_STRING(): return INPUT().split()

N = SORO_INT()
N = N/2
if N%2==0:
    N = int(N)
else:
    print('No')
    #print(N)
    sys.exit()
#print(N)
S = SORO_STRING()
#S = list(S)
S_1 = S[:N]
S_2 = S[N:]
if S_1 == S_2:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
def main():
    inNumber = input()
    inStr = list(input())
    try:
        wk_inNumber = int(inNumber[0])
    except Exception as e:
        print('整数値を入力してください')
        return 0

    if wk_inNumber % 2 == 1:
        print('No')
        return 0

    if wk_inNumber != len(inStr):
       print('No')
       return 0

    i = 0
    while i < wk_inNumber / 2 :
        j = int(wk_inNumber / 2 + i)
        if inStr[i] != inStr[j]:
            print('No')
            return 0
        i += 1

    print('Yes')


main()

Submission status: Wrong Answer

Solution code:
n=int(input())
s=list(input())
s=set(s)
if len(s)==n/2:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
a=int(input())
S=input()
if a%2 != 0:
  print("No")
else:
  b=0
  while	b<=a//2-1:
        S[b]==S[a//2+b]
        b=b+1
  if b==a//2:
    print("Yes")
  else:
    print("No")

Submission status: Wrong Answer

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

if N % 2 == 0 and N != 2:
    half_N = int(N / 2)

    if S[0:half_N - 1] == S[half_N:len(S)-1]:
        print('Yes')

elif N == 2 and S[0] == S[1]:
    print('Yes')

else:
    print('No')

Submission status: Wrong Answer

Solution code:
##B
n = int(input())
s = str(input())

n1 = int(n/2)

print(s[0:n1]+s[n1:n])

if s == s[0:n1]+s[n1:n] and n % 2 == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
s = list(str(input()))
if n == 1:
  print('No')
  exit()
for i in range(int(n/2)):
  print(i)
  if s[i] != s[int(n/2+i)] or n%2:
    print('No')
    exit()
print('Yes')

Submission status: Wrong Answer

Solution code:
N=int(input())
S=input()
cond=0
#print(S[0:3])

if N==1:
  print('No')
else:
  for n in range(N):
    if cond==1:
      break
    if N%(n+1)==0:
      for j in range(N//(n+1)):
        if S[j:j+n+1]==S[j+n+1:j+2*n+2]:
#         print(n,S[j:j+n+1],S[j+n+1:j+2*n+2])
         cond=1
         print('Yes')
         break
    else:
      for j in range(N//(n+1)-1):
       if S[j:j+n+1]==S[j+n+1:j+2*n+2]:
         cond=1
         print('Yes')
         break
  if cond==0:
    print('No')

Submission status: Wrong Answer

Solution code:
import sys

n = int(input())
s = sys.stdin.readline()
print s

if n % 2 == 1: print "No"
else :
    for i in range(n / 2):
	if s[i] != s[i + n / 2]:
            print "No"
            break
    else:
        print "Yes"

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input()
if n == 1:
  print("No")
elif s == s[n - 1:]:
    print("Yes")
else:
    print ("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
Mylist = list(input())
ANSlist = []
if N%2 == 1:
  print("No")
else: 
    for i in range(int(N/2)):
        if Mylist[i] == Mylist[i + int(N/2)]:
            ANSlist.append("Yes")
    if len(ANSlist) == N/2:
        print("Yes")

Submission status: Wrong Answer

Solution code:
n=input()
if len(n)%2:print("No")
else:print("Yes" if n[0:len(n)//2]==n[len(n)//2:] else "No")

Submission status: Wrong Answer

Solution code:
n = int(input())
s = list(input())

a = n//2
if n % 2 == 1:
    print("No")
elif s[0:a-1] == s[a:-1]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n=int(input())
li=list(input())
if n%2==0:
  t=int(n/2)
  a=li[:t]
  t=t-1
  b=li[:-t-1]
  for (i,j) in zip(a,b):
    if i!=j:
        print('No')
        break
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
N=input()
n=int(int(N)/2)
S=input()

T=S[0:n]
print(T)
if S==T+T:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N=int(input())
S=input()
cond=0
#print(S[0:3])

if N==1:
  print('No')
else:
  for n in range(N):
    if cond==1:
      break
    if N%(n+1)==0:
      for j in range(N//(n+1)):
        if S[j:j+n+1]==S[j+n+1:j+2*n+2]:
#         print(n,S[j:j+n+1],S[j+n+1:j+2*n+2])
         cond=1
         print('Yes')
         break
    else:
      for j in range(N//(n+1)-1):
       if S[j:j+n+2]==S[j+n+2:j+2*n+2]:
         cond=1
         print('Yes')
         break
  if cond==0:
    print('No')

Submission status: Wrong Answer

Solution code:
a = int(input())
s = list(input())

if (a%2 !=0):
  print('No')
  
else:
  b = a/2
  i = 0
  k = 0
  for i in range(int(b-1)):
    if (s[i] == s[int((int(b)+i))]):
      k+=1
    else:
      break
    
  if(k==b-1):
    print('Yes')
  else:
    print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
s = list(input())
flg = True
if n == 1:
    flg = False

half = int(n / 2)

zenhan = s[0:half]
kouhan = s[half:]

if flg:
    if len(s) == n:
        for i in range(0, half):
            if zenhan[i] != kouhan[i]:
                flg = False
    if flg:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Submission status: Wrong Answer

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

if n%2!=2:
  print('No')
  exit()
x=int(n/2)
print('Yes') if s[:x]==s[x:] else print ('No')

Submission status: Wrong Answer

Solution code:
import sys
readline = sys.stdin.readline
N = int(readline())
S = readline()

if N%2==0:
  s1 = S[:(N//2)]
  s2 = S[(N//2):]
  if s1 == s2:
    print('Yes')
  else:
    print('No')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input()
if s == s:
  print("No")
elif s == s[n - 1:]:
    print("Yes")
else:
    print ("No")

Submission status: Wrong Answer

Solution code:
N=int(input())
S=input()
ans="NO"
if(N<2):
  print(ans)
else:
  middle = N/2
  T=S[0:int(N/2)]
  T2=S[int(N/2):]
  if(T==T2):
    ans ="YES"
    print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
S=str(input())
if N%2==1:
  print('No')
else:
  f=True
  h=int(N/2)
  if S[0:h-1]==S[h:N-1]:
    print('Yes')
  else:
    print('No')

Submission status: Wrong Answer

Solution code:
import sys

n = int(input())
s = input()
if s == s[n - 1:]:
  if s == s:
    print ("No")
    sys.exit()
  print("Yes")
  sys.exit()
else:
  print ("No")

Submission status: Wrong Answer

Solution code:
import sys

n = int(input())
s = sys.stdin.read()
print s

if n % 2 == 1: print "No"
else :
    for i in range(n / 2):
	if s[i] != s[i + n / 2]:
            print "No"
            break
    else:
        print "Yes"

Submission status: Wrong Answer

Solution code:
s=input()
S=('Yes' * (s[0:len(s)//2]==s[len(s)//2::])) or 'No'
print(S)

Submission status: Wrong Answer

Solution code:
N=int(input())
S=input()
ans="NO"
if(N<2):
  print(ans)
middle = N/2
T=S[0:int(N/2)]
T2=S[int(N/2):]
if(T==T2):
  ans ="YES"
print(ans)

Submission status: Wrong Answer

Solution code:
import sys
INPUT = sys.stdin.readline
#入力関数
def SORO_INT(): return int(INPUT())
def MULT_INT_LIST(): return list(map(int, INPUT().split()))
def MULT_INT_MAP(): return map(int, INPUT().split())
def SORO_STRING(): return INPUT()
def MULT_STRING(): return INPUT().split()

N = SORO_INT()
N = N//2
#print(N)
S = SORO_STRING()
#S = list(S)
S_1 = S[:N]
S_2 = S[N:]
if S_1 == S_2:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N=int(input())
S=str(input())
if N%2==1:
  print('No')
else:
  f=True
  h=int(N/2)
  if S[0:h-1]==S[h:N]:
    print('Yes')
  else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = input()
if s[0:len(s)//2]==s[len(s)//2:len(s)]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())

fin = n//2
s = input()

debut = s[0:fin]

if s.endswith(debut):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import math
n=int(input())
a=input()
a.split()
#a=list(map(int,input().split()))
if n%2==1:
    print('No')
else:
    k=n//2
    current=1
    i=0
    while(i!=k-1):
        if a[i]!=a[i+k]:
            current=current*0
        i+=1
    if current==1:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
n=int(input())
s=str(input())
l1=[]
l2=[]
if len(s)%2!=0:
  print("No")
else:
  for i in range(n):
    if i<n/2:
      l1.append(s[i])
    if i>=n/2:
      l2.append(s[i])
if l1==l2:
  print("Yes")

else:
  print("No")

Submission status: Wrong Answer

Solution code:
num = int(input())
list = input()
if num%2 == 1:
  print("No")
else:
  t = int((num/2)-1)
  s = num-1
  if list[0:t] == list[t+1:s] and num != 0:
    print("Yes")
  else:
    print("No")

Submission status: Wrong Answer

Solution code:
s=input()
S=('Yes' * (s.count(s[0:len(s)//2])==2)) or 'No'
print(S)

Submission status: Wrong Answer

Solution code:
import sys

n = int(input())
s = sys.stdin.read()
print s

if n % 2 == 1: print "No"
else :
    for i in range(n / 2):
	if s[i] != s[i + n / 2]:
            print "No"
            break
    print "Yes"

Submission status: Wrong Answer

Solution code:
n=int(input())
s=list(input())

con=0
d=n//2
c=0
if n%2==1:
    print("No")

for _ in range(n//2):
    if s[c]==s[d]:
        con+=1
    d+=1
    c+=1

if con==n//2:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

if(int(n)%2 != 0 or int(n) == 0):
    print("No")
    exit()

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

if(s1 == s2):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

if N % 2 == 0:
    half_N = int(N / 2)

    if S[0:half_N - 1] == S[half_N:len(S)-1]:
        print('Yes')
    else:
        print('No')

else:
    print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
s = list(input())
flg = True
if n == 1:
    flg = False

half = int(n / 2)

zenhan = s[0:half]
kouhan = s[half:]

if flg:
    for i in range(0, half):
        if zenhan[i] != kouhan[i]:
            flg = False
    if flg:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline

#input
N = int(input())
S = str(input())

#output
if N % 2 == 1:
    print("No")
elif N % 2 == 0:
    M = int(N/2)
    T = S[:M]
    U = S[M:]
    if T == U:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
S = str(input())
n = 0
A = []
B = []
if N % 2 == 0:
  n = int(N / 2)
  for i in range(0, n):
    A.append(S[i])
    B.append(S[n+i])

  if A == B:
    print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input()
sol = 0

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

if sol == n // 2:
    print("Yes")

else:
    print("No")

Submission status: Wrong Answer

Solution code:
import sys

N = int(input())
S = input()

if N % 2 == 0:
    hf = int(N / 2)
    if S[0:hf - 1] == S[hf:(len(S)-1)]:
        print('Yes')
        exit()
print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input()
if s == s[n - 1:]:
    print("Yes")
else:
    print ("No")

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':
    N = int(input())
    T = input()
    middle = int(N / 2)

    if (N % 2) == 0 :
        if (T[0:(middle-1)] == T[middle:(N-1)]):
            print('Yes')
            exit(0)
    print('No')
    exit(0)

Submission status: Wrong Answer

Solution code:
import sys
N = int(input())
S = input()
if N%2 != 0:
    print("No")
    sys.exit()

mid = int(N/2)
S_pre = S[:mid]
S_later = S[mid:]
print(S_pre)
print(S_later)
if S_pre == S_later:
    print("Yes")
else:
    print("No")