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:
n = input()
s = input()

if(int(n)%2 != 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:
l = int(input())
s = str(input())

if l %2 == 1:
  print('No')
else:

  t = int(l / 2)

  if (s[0:t] == s[t+1:l+1]):
    print('Yes')
  else:
    print('No')

Submission status: Wrong Answer

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



s_start = S[0:N//2]
s_end = S[(N//2) + 1:]
if N == 1:
  print('No')
elif s_start == s_end:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
s = list(str(input()))
for i in range(int(n/2)):
  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 = 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 = list(input())
print(s)
b = n//2
if s[0:b] == s[b:n]:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
cnt=int(input())
word=input()
if cnt/2>=1:
    list=[word[i: i+3] for i in range(0,len(word),int(cnt/2))]
    if list[0]==list[1]:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n=int(input())
s=str(input())
if n%2==1:
  print("No")
else:
  s1=s[0:int(n/2):1]
  s2=s[int(n/2):n:1]
  print(s1,s2)
  if s1==s2: 
    print("Yes")
  else:
    print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input()
a = n//2-1
if  s[0:a] == s[a+1:n-1] and n >1 and n%2 == 0:
        print('Yes')
else:
        print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import collections

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

s_list = list(s)
collections = collections.Counter(s)

res = []
for c in collections.values():
  if c == 2:
    res.append(True)

if len(res) == len(collections):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
S = input()
check = 0
for i in range(0,N//2):
    if S[i] == S[i+N//2]:
        check += 1
if ((check == N//2)and(check != 0)):
    print('Yes')
else:
    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:
      pass
    
  if(k==b-1):
    print('Yes')
  else:
    print('No')

Submission status: Wrong Answer

Solution code:
# your code goes herefro
from collections import Counter
n=int(input())
s=input()
res=Counter(s)
ans=[]
if(n==1):
	print("No")
else:
	for k,v in res.items():
		ans.append(v)
	if(len(set(ans))==1):
		print("Yes")
	else:
		print("No")

Submission status: Wrong Answer

Solution code:
import collections

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

s_list = list(s)
collections = collections.Counter(s)

res = []
for c in collections.values():
  if c == 2:
    res.append(True)

if len(res) == len(collections):
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
N = int(input(''))
S = input('')
k = int(N/2)
if S.count(S[0:k]) > 1:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:


def main():
    N = int(input())
    S = input()

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


if __name__ == "__main__":
    main()

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:
    T = S[0:int(N/2)]
    U = S[int(N/2):]
    if T == U:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
'''  Hariom_Pandey
      16.11.2019   '''
A=int(input())
s=str(input())
l=[]
s1=s[A//2::]
s2=s[::A]
if(s2==s1):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
S = input()
if N % 2 == 1:
    print("No")

l = 0
r = int(N / 2)
while r < N:
    if S[l] != S[r]:
        print("No")
        exit()
    l += 1
    r += 1
    
print("Yes")

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!
import sys
a = input()
st = input()
x = True
for c in st:
    if st.count(c) != 2:
        break
else:
    print("Yes")
    sys.exit()
print("No")

Submission status: Wrong Answer

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

d, a = divmod(N, 2)
if a == 0 and d > 1 and S[:d] == S[d:]:
    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")
elif N % 2 == 0:
    T = S[0:int(N/2)]
    U = S[int(N/2):]
    if T + T == S:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if N == 1 or N % 2 == 1:
    print("No")

elif s[0:int(N/2)-1] == s[int(N/2):-1]:
    print("Yes")

else:
    print("No")

Submission status: Wrong Answer

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

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())
s = input()
 
print(type(s))
if(n % 2 == 1):
    print("No")
else:
    if (s[:(n//2)] == s[(n//2):]):
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input()
a = n//2-1
if  s[0:a] == s[a+1:n-1] and n >1: 
        print('Yes')
else:
        print('No')

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!
import sys
a = input()
st = input()
x = True
for c in st:
    if st.count(c) != 2:
        print(c)
        break
else:
    print("Yes")
    sys.exit()
print("No")

Submission status: Wrong Answer

Solution code:
n=int(input())
s=str(input())
if n%2==1:
  print("No")
else:
  s1=s[0:int(n/2):1]
  s2=s[int(n/2)+1:n:1]
  if s1==s2: 
    print("Yes")
  else:
    print("No")

Submission status: Wrong Answer

Solution code:
l = int(input())
s = str(input())

if l %2 == 1:
  print('No')
else:

  t = int(l / 2)

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

Submission status: Wrong Answer

Solution code:
n = int(input())

s = input()

s_list = list(s)

flag = True
if n % 2 == 1:
    print('No')
    flag = False

if flag and ("".join(s_list[:int(n/2)]) == "".join(s_list[int(n/2):])):
    print('Yes')

Submission status: Wrong Answer

Solution code:
s=input()
if len(s)%2!=0:
    print("No")
    exit()
a=0
for i in range(1,int((len(s)+1)/2)):
    if s[i]!=s[int(len(s)/2)+i]:
        a=1
if a==0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

if S.count(S[0:int(N/2)]) > 1:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
S = list(input())
a = int(N/2)
if N%2 == 0:
    a1 = S[:a]
    a2 = S[-a:]
    if a1 == a2:
        print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
l = int(input())
words = input()

if l % 2 != 0:
    exit()

m = int(len(words) /2)
print(m)
first = words[0:m]
last = words[m:]
if first == last:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
A = str(input())

n = int(N/2)
m = N-n
print(m)
if n == m:
  if A[:n] == A[n:]:
    print('Yes')
  else:
    print('No')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())
    s = input()
    if n == 1:
        print("No")
        return
    if n % 2 == 0:
        s1 = s[:(n//2)]
        s2 = s[n//2:]
        for i in range(n//2):
            if s1[i] != s2[i]:
                print("No")
                return
        print("Yes")
        return
    else:
        s1 = s[:n//2]
        s2 = s[(n//2)+1:]
        for i in range(n//2):
            if s1[i] != s2[i]:
                print("No")
                return
        print("Yes")
        return


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

t = int(n/2)

if(s[:t]*2 == s):print('YES')
else:print('NO')

Submission status: Wrong Answer

Solution code:
import sys
n = int(sys.stdin.readline())
s = sys.stdin.readline()
l = int(len(s) /2)
if s[:l] == s[l:]:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

print(type(s))
if(n % 2 == 1):
    print("No")
else:
    if (s[:(n//2)] == s[(n//2):]):
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

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

print(s[0:int(n/2)], s[int(n/2):n])

if s[0:int(n/2)] == s[int(n/2):n]:
    print("Yes")
else: print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())

S = [i for i in input()]

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

Submission status: Wrong Answer

Solution code:
from sys import stdin
#from collections import deque
#from math import sqrt, floor, ceil, log, log2, log10, pi, gcd
def ii(): return int(stdin.readline())
def fi(): return float(stdin.readline())
def mi(): return map(int, stdin.readline().split())
def fmi(): return map(float, stdin.readline().split())
def li(): return [x for x in mi()]
def si(): return stdin.readline()
n=ii()
print(n*n)

Submission status: Wrong Answer

Solution code:
n = int(input().strip())
s = input().strip()
print(s[:n//2],s[n//2:])
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 = input()

s = [ i for i in S]
flag = True

if N % 2 == 1:
    print("No")
else:
    for j in range(int(N/2)):
        if s[j] != s[j+int(N/2)]:
            print("No")
            flag = False
if flag:
    print("Yes")

Submission status: Wrong Answer

Solution code:
a=[]
b=0
c=[]
d=[]
i=0
b=int(input())
aa=input()
for x in aa:
    a.append(x)
if len(a)//2==1:
    print("No")
else:
    while i<len(a)//2:
        c.append(a[i])
        i+=1
    while i<len(a):
        d.append(a[i])
        i+=1
    if c==d:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if n < 2:
   print("No")

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

else:
   t_num = int(n / 2)

   t = s[:t_num]

   if t * 2 == s:
      print("Yes")
   else:
      print("No")

Submission status: Wrong Answer

Solution code:
A = input()
AA = A[0:int(len(A)/2)]
if A == (AA+AA):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input()
output = "No"

for i in range(1, n - 1):
    if n % i != 0:
        continue

    else:
        tmp = s[:i:]
        if tmp * (n // i) == s:
            output = "Yes"


print(output)

Submission status: Wrong Answer

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


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

Submission status: Wrong Answer

Solution code:
'''  Hariom_Pandey
      16.11.2019   '''
A=int(input())
s=str(input())
l=[]
if(len(s)%2!=0):
    print('No')
else:
    s1=s[(A//2)::]
    if(s[0::A//2]==s1):
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
a=int(input())
b=list(input())
count=0
if a%2==1:
    print("No")
else:
    for i in range(0,a//2,1):
        print(b[i])
        print(b[i+a//2])
        if b[i]!=b[i+a//2]:
            count+=1
    if count==0:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

n2 = N // 2
if n2 > 1 and S[:n2] == S[n2:]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
#!python3.4.3

n = int(input())
s = input()
t = int(n/2)

if s[:t] in s[t:] and n > 1:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

if len(S) == 1:
    print("No")
    exit()

if S.count(S[:int(len(S)/2)]) == 2:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input()
output = "No"

for i in range(1, n - 1):
    if n % i != 0:
        continue

    else:
        tmp = s[:i:]
        print(tmp)
        if tmp * (n // i) == s:
            output = "Yes"


print(output)

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input()
if n%2 == 0:
  s0 = s[0:int((n//2)-1)]
  if s0 == s[int(n//2):]:
    print('Yes')
  else:
    print('No')
else:
  print('No')

Submission status: Wrong Answer

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

d = n // 2

if n % 2 == 1:
    print('No')
elif s[0:d - 1] == s[d:n - 1]:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
s = list(input())
if n % 2 == 0:
    s1 = s[0:int(n / 2 - 1):1]
    s2 = s[int(n / 2):-1]
    if s1 == s2:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
n=int(input())
s=input()
if n%2==1:
  print('No')
else:
  if n==6 and s[0]==s[3] and s[1]==s[4] and s[2]==s[5]:
    print('Yes')
  elif n==4 and s[0]==s[2] and s[1]==s[3]:
    print('Yes')
  elif n==2 and s[0]==s[1]:
    print('Yes')
  else:
    print('No')

Submission status: Wrong Answer

Solution code:
n=int(input())
s=str(input())
s1 = s[0:n//2-1]
s2 = s[n//2:-1]
if s1 == s2:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
def e(a):
    n=len(a)
    if len(a)%2!=0:
        return 'No'
    else:
        if a[:n//2]==a[(n//2):n]:
            return 'Yes'
        else:
            return 'No'
a=input()
print(e(a))

Submission status: Wrong Answer

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

S_pre = S[:N-1]
S_later = S[N:]
if S_pre == S_later:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

flag = True
if len(s) >= 2:
    n1 = s[0:n//2]
    n2 = s[n//2:n]
    for i in range(n//2):
        if n1[i] != n2[i]:
            flag = False
            break
    if flag:
        print('Yes')
    else :
        print('No')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s=input()
if len(s)%2!=0:
    print("No")
    exit()
a=0
for i in range(int(len(s)/2)):
    if s[i]!=s[int(len(s)/2)+i]:
        a=1
if a==0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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


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

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input()
# print(s[:n // 2], s[n//2+1:n])
if n % 2 == 1 :
    print("NO")
elif s[:n // 2] == s[n//2:n]:
    print("YES" )
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
import sys
n = int(input())
s = input()
if n%2 == 1:
    print("No")
else:
    for i in range(n//2):
        if s[i] != s[i+n//2]:
            print("No")
            sys.exit()
print("Yes")

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]:
    print("Yes")
  else:
    print("No")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
# get a integer
n = int(raw_input())
s = raw_input()


if n % 2 == 0:
  r=s[0:n/2] == s[n/2:]
else:
  r=False
print(str(r))

Submission status: Wrong Answer

Solution code:
import sys
n=int(input())
s=str(input())
s1 = s[0:n//2-1]
s2 = s[n//2:-1]

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

Submission status: Wrong Answer

Solution code:
N =int(input())
S =str(input())
if N == 1:
    print("No")
    exit()
if N % 2 == 1:
    print("No")
    exit()
for i in range(1,N):
    if S[0] == S[i]:
        if S[:i] == S[i:]:
            print("Yes")
        else:
            print("No")

Submission status: Wrong Answer

Solution code:
import sys
n = int(sys.stdin.readline())
if n % 2 == 1:
    print('No')
    exit()
s = sys.stdin.readline()
l = int(len(s) /2)
if s[:l] == s[l:]:
    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")
elif N % 2 == 0:
    T = S[0:int(N/2)]
    if T + T == S:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:


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

if n < 2:
   print("No")
   
if n // 2 != 0:
   print("No")

else:
   t_num = int(n / 2)

   t = s[:t_num]

   if t * 2 == s:
      print("Yes")
   else:
      print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input().strip())
s = input().strip()
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 = input()

s_list = list(s)

flag = True
if n % 2 == 1:
    print('No')
    flag = False

if flag and ("".join(s_list[:n//2]) == "".join(s_list[n//2:])):
    print('Yes')

Submission status: Wrong Answer

Solution code:
n=int(input())
s=input()
if n%2==0 and s[:n//2] == s[n//2:]:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
N=int(input())
S=str(input())
for i in range(N//2):
  for j in range(i+1,N//2):
    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:
    print('No')
    exit()

if S[0:N//2] == S[N//2:N]:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
n = int(input())
s = list(input())
m = 0
s.sort()
for i in range(n - 1):
    if s[i] == s[i + 1]:
        print("Yes")
        m += 1
        break
if m == 0:
    print("No")

Submission status: Wrong Answer

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

_n = int(input())
_s = input()


def chker(n, s):
    if n % 2 != 0:
        print('No')
        return

    hs = len(s) // 2
    ls, rs = s[:hs], s[hs:]
    if ls == rs:
        print('Yes')
    else:
        print('No')


chker(_n, _s)

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input()
if s == s[:n//2+1]*2:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
s = input()
ans = s[0:int(len(s)/2)]
if 2*ans == s:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

f = 0

try:
    for i in range(0,n//2):
        if s[i] == s[i+n//2]:
            pass
        else:
            f = 1
            break
except:
    f = 1

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

Submission status: Wrong Answer

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

if len(s) % 2 != 0:
    print("No")

half_len = int(len(s)/2)
if s[:half_len]+s[:half_len] == s:
    print("Yes")
else :
    print("No")

Submission status: Wrong Answer

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

if N % 2 != 0:
    print("No")
else:
    first = S[:int(N/2)]
    second = S[int(N/2):]
    print(first)
    print(second)

    if first == second:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

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

if (N%2==0):
    if(S[0:(N//2)-1]==S[(N//2):N-1]):
        ans='Yes'
    else:
        ans='No'
    
else:
    ans='No'

print(ans)

Submission status: Wrong Answer

Solution code:
import sys
S = input()
if S[len(S)//2:] ==S[:len(S)//2]:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
A = input()
AA = A[0:int(len(A)/2)]
BB = A[int(len(A)/2):]
if AA == BB:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input()
print('Yes' if n%2==0 and s[0:n//2-1] == s[n//2:n-1] else 'No')

Submission status: Wrong Answer

Solution code:
n=int(input())
s=input()
if len(s)%2==1:
    print('No')
else:
    ok=1
    mid=len(s)//2
    for i in range(mid):
        if s[i]!=s[mid]:
            ok=0
            break
    if ok:
        print('Yes')
    else :
        print('No')

Submission status: Wrong Answer

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

if N%2!=0:
  print("No")

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

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input()
if n%2 == 0:
  s0 = s[0:(n//2)-1]
  if s0 == s[n//2:]:
    print('Yes')
  else:
    print('No')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
N =int(input())
S =str(input())
if N == 1:
    print("No")
    exit()
for i in range(1,N):
    if S[0] == S[i]:
        if S[:i] == S[i:]:
            print("Yes")
        else:
            print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input()
flag = True
if n % 2 == 1:
    flag = True
for i in range(0,n // 2):
    if s[i] != s[int(i + (n // 2))]:
        flag = False
        break
if flag:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
s=input()
flag=1
if n%2==1:
  print('No')
else:
  for i in range(1,n//2):
    if s[i]==s[i+n//2]:
      flag*=1
    else:
      flag*=0
  if flag==1:
    print('Yes')
  else:
    print('No')

Submission status: Wrong Answer

Solution code:
import numpy as np

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

if n == 1:
    print("No")
    quit()

for i in range(int(n / 2)):
    if not s[i] == s[i + int(n / 2)]:
        print("No")
        quit()


print("Yes")

Submission status: Wrong Answer

Solution code:
import sys
N = int(input())
S = input()
l = len(S)
if l % 2 != 0:
    print('No')
    sys.exit(0)
h  = l // 2
print(h)
if S[:h] == S[h:]:
    print('Yes')
    sys.exit(0)
print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n=int(input())
s=input()
if n%2==0:
    m=n//2-1
    #print(s[0-m])
    #print(s[(m+1)-n-1])
    if s[0:m]==s[(m+1):n-1]:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Wrong Answer

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

ans = 'Yes'
if len(s) % 2 == 1:
    ans = 'No'
else:
    print(s[:n//2], s[n//2:])
    if s[:n//2] == s[n//2:]:
        ans = 'Yes'
    else:
        ans = 'No'

print(ans)

Submission status: Wrong Answer

Solution code:
def f():
    n = int(input())
    s = input()
    if n%2:
        return "NO"
    else:
        half = n//2
        for i in range(half):
            if s[i] != s[i+half]:
                return "NO"
        return "YES"

print(f())

Submission status: Wrong Answer

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

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

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

n=int(input())
s=input()
s1=s[:n//2]
s2=s[n//2:]
if s1==s2:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

N = N // 2

if S[:N+1] in S:
  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
T = S[0:(N//2)]

if T + T == S:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import math

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

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

Submission status: Wrong Answer

Solution code:
import sys
n=int(input())
s=input()
if n==1:
  print("No")
  sys.exit()
for i in range(n//2):
  if s[i]==s[n//2+i]:
    pass
  else:
    print("No")
    sys.exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
N = int(input())
S = input()
if N % 2 != 0:
    print('No')

half = N // 2
for i in range(half):
    if S[i] != S[i+half]:
        print('No')
        exit()

print('Yes')

Submission status: Wrong Answer

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

if n % 2 != 0:
    print('No')

mid = n // 2

t1 = s[0:mid]
t2 = s[mid:]

print('Yes') if t1 == t2 else print('No')

Submission status: Wrong Answer

Solution code:
num = int(input())
s = input()
flg=False
if num>1 and num%2==0:
    if s[:num//2] == s[num//2:]:
        flg=True
if flg:
    print('True')
else:
    print('No')

Submission status: Wrong Answer

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

if len(S) == 1:
  print('No')
  sys.exit(0)
elif len(S) % 2:
  print('No')
  sys.exit(0)
else:
  l = int(len(S) / 2)
  a = S[:l]
  b = S[l:]
  if a == b:
    print('Yes')

Submission status: Wrong Answer

Solution code:
N = int(input())
S = input()
if N == 1:
    print("No")
    exit()

for i in range(1,N):
    s1 = S[:i]
    s2 = S[i:]
    print(s1,s2)
    if s1 == s2 and len(s1)*2 == N:
        print("Yes")
        exit()
print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!

N = int(input())
S = input()
if len(S) % 2 == 0:
    char1 = S[0:N // 2]
    char2 = S[N // 2: N + 1]
    print(char1, char2)
    if char1 == char2:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Submission status: Wrong Answer

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

flag = False
for i in range(int(n/2)):
    if s[:i] == s[i:i*2]:
        flag = True
if flag:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

print(S[:N//2]==S[N//2:])