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

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def LS(): return list(map(list, input().split()))
def S(): return list(input().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')

#solve
def solve():
    n = II()
    s = S()
    if s[: n // 2] == s[n // 2 :]:
        print("Yes")
    else:
        print("No")
    return


#main
if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

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

if N%2 != 0:
  print('No')
  sys.exit()
else:
  if S[0:int(N/2)] == S[int(N/2):]:
    print('Yes')
  else:
    print('No')

Submission status: Accepted

Solution code:
def hantei_s(n, string_a):
    midle = int(n / 2)
    #print(midle)
    if string_a[0:midle] == string_a[midle:]:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    n = int(input())
    string_a = input()
    hantei_s(n, string_a)

Submission status: Accepted

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

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

s_1 = s[0:(n/2)]
s_2 = s[(n/2):]


if s_1 == s_2:
    print 'Yes'
else:
    print 'No'

Submission status: Accepted

Solution code:
m = input()
n = input()
M = int(m)
b = M % 2
if b == 1:
    print("No")
else:
    c = M / 2
    d = int(c)
    if n[:d] == n[d:]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
S = list(input())
def echo(S,N):
    if N % 2 != 0:
        return "No"
    else:
        for i in range(0,N//2):
            if S[i] != S[i + (N//2)]:
                return "No"
        return "Yes"
print(echo(S,N))

Submission status: Accepted

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

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

Submission status: Accepted

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

count = 0

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
inputbox1 = input()
inputbox2 = input()

N = int(inputbox1)
box = list(inputbox2)
count = 0
if (N%2 == 1):
    print("No")
else:    
    harf = int(N/2)
    for i in range (0,harf):
        if box[i]==box[i+harf]:
            count = count + 1
    
    if count == harf:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
import os
import numpy as np

class getStdin(object):
    @classmethod
    def get_int(cls):
        return int(input())

    @classmethod
    def get_str(cls):
        return str(input())

class funcCls(object):
    @classmethod
    def done(cls, n, s):
        l = len(s) // 2
        mm = s[0:l]
        if s == mm + mm:
            print('Yes')
        else:
            print('No')

        return


if __name__ == '__main__':
    n = getStdin.get_int()
    s = getStdin.get_str()
    funcCls.done(n, s)

    os.sys.exit(0)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
S=str(input())
n=int((N/2))
if N%2==0:
    mae=S[0:n]
    ato=S[n:]

    if mae==ato:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

for i in range(n//2):
    if s[i] != s[i + n//2]:
        print("No")
        exit(0)
print("Yes")

Submission status: Accepted

Solution code:

N=int(input())

S=input()

div=N/2

if(N%2==1):
    print("No")
else:
    tmp=S[0:int(div)]
    TT=tmp+tmp
    if(TT==S):
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

if n % 2 != 0:
    print(output)

else:
    tmp = s[: n // 2 :]
    if tmp * 2 == s:
        output = "Yes"

    print(output)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
if N % 2 ==1:
    print('No')
    exit
else:
    S = str(input())
    n = int(N / 2)
    former_S = S[:n]
    latter_S = S[n:]
    if former_S == latter_S:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
import sys

def main():
  N = int(input())
  S = list(input())
  if len(S) % 2 == 1:
    print('No')
    sys.exit()
  else:
    half = int(N / 2)
    for i in range(half):
      if S[i] != S[half + i]:
        print('No')
        sys.exit()
  print('Yes')

main()

Submission status: Accepted

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

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

if s[0:int(n/2)] != s[int(n/2):n]:
    print('No')
    exit()

print('Yes')

Submission status: Accepted

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

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

Submission status: Accepted

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+i]:
            ok=0
            break
    if ok:
        print('Yes')
    else :
        print('No')

Submission status: Accepted

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

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

Solution code:
def b():
    n = int(input())
    s = input()
    if n % 2 != 0:
        print("No")
        return

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

if __name__ == '__main__':
    b()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
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")
      exit()
  print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
n = int(input())
n //= 2
str = input()
sStart,sLast = str[:n],str[n:]

if sStart == sLast :
  print("Yes")
else :
  print("No")

Submission status: Accepted

Solution code:
def main(n, s):
    if n % 2 != 0:
        print("No")
        return

    if s[:n//2] == s[n//2:]:
        print("Yes")
        return
    
    print("No")
    return

if __name__ == "__main__":
    n = int(input())
    s = input()
    main(n, s)

Submission status: Accepted

Solution code:
N=int(input())
S=list(input())
if N%2==1:
  print("No")
  exit()
for i in range(N//2):
  if S[i]!=S[N//2+i]:
    print("No")
    exit()
print("Yes")

Submission status: Accepted

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

if N%2==0:
    for i in  range(0,int(N/2)):
        if S[i]!=S[i+int(N/2)]:
            flag+=1

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

Submission status: Accepted

Solution code:
len = int(input())
string = input()
HS = 0

for i in range(len):
	if len - HS <= i:
		break
	HS+=1

if string[:HS] == string[HS:]:
	print("Yes")
else:
	print("No")

Submission status: Accepted

Solution code:
a=int(input())
b=input()
C=''
d=''
if(a != int(a/2)*2):
    print('No')
else:
    e=int(a/2)
    c = b[:e]
    d = b[e:]
    if(c==d):
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if N % 2 != 0:
  print("No")
else:
  if S[:M] == S[M:]:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

Solution code:
import numpy as np

n = int(input())
s = [i for i in input()]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s = input()
if n%2 == 1:
    print("No")
    exit()
m = int(n/2)
a = s[:m]
b = s[m:]
if a == b:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

SS = list(S)

NN = N // 2

count = 0

if N % 2 == 1:
    print('No')
else:
    for i in range(NN):
        if SS[i] != SS[i+NN]:
            count += 1
            print('No')
            break
    if count == 0:
        print('Yes')

Submission status: Accepted

Solution code:

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

t_num = int(n / 2)

t = s[:t_num]

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

Submission status: Accepted

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

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

tlen = N // 2

if S[:tlen] == S[tlen:]:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a = int(input())//2
b = list(input())

if len(b) % 2 == 1:
    print('No')
else:
    if b[:a] == b[a:]:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# submission # - User: herp_sy
# https://atcoder.jp/contests/
#
# lang: Python3 (3.4.3)

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

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

else:
  for i in range(n // 2):
    # print('{} <--> {}'.format(s[i], s[n // 2 + i]))
    if not(s[i] == s[n // 2 + i]):
      print('No')
      exit(0)
  print('Yes')

Submission status: Accepted

Solution code:
n = int(input())
a = list(input())
if n % 2 != 0:
	print("No")
else:
	m = n//2
	a1,a2 = a[m:],a[:m]
	if (a1 == a2):
		print("Yes")
	else:
		print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
S = input()
leng = len(S)

if leng % 2 == 1:
    print('No')
else:
    if S[:leng//2] == S[(leng//2):]:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
N = int(input())
S = input()
 
s = [ i for i in S]
flag = True
 
if N % 2 == 1:
    print("No")
    flag = False
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: Accepted

Solution code:
N = int(input())
str_list = list(input())
str_list = [str_list[:N//2],str_list[N//2:]]
if str_list[0] == str_list[1]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, S = open(0).read().split()
# print(N, S)
n = int(int(N)/2)
print('Yes' if S[:n] == S[n:] else 'No')

Submission status: Accepted

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

Submission status: Accepted

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

if n%2 == 1:
    print("No")
#print(type(n/2+1))
# print (s[0:int(n/2)] )
# print(s[int(n/2):])
elif s[0:int(n/2)] == s[int(n/2):]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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')
  else:
    print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

d = n // 2

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

Submission status: Accepted

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

if n % 2 != 0:
    print('No')
else:
    ans = True
    for i in range(int(n/2)):
        if s[i] != s[i + int(n/2)]:
            print('No')
            ans = False
            break
    if ans:
        print('Yes')

Submission status: Accepted

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

if n%2 != 0:
    print('No')
elif s[0:n//2]*2 == s:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
n = int(input())
s = input()
n2 = int(n/2)

s1 = s[0:n2]
s2 = s[n2:n]

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

Submission status: Accepted

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

if n % 2 == 1:
    print('No')
else:
    sli = int(n/2)
    before_s = s[:sli]
    after_s = s[sli:]
    if before_s == after_s:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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

k=int(N/2)

if(S[0:k] == S[k:N]):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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


a = int(n/2)
if n % 2 ==0 and s[:a] == s[a:]:
	print('Yes')
else:
	print('No')

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

N2= int(N/2)

FS = S[0:N2]
BS = S[N2:N]

if FS == BS:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Solution code:
# -*- coding: utf-8 -*-
N = int(input())
S = str(input())

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())

s = list(input())

hanbun = int(n / 2)

t1 = s[:hanbun]
t2 = s[hanbun:]

if t1 == t2:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

_n = int(input())
_s = input()[:-1]


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

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

ans = "No"

if n%2 == 0:
    if s[:n//2] == s[n//2:]:
        ans = "Yes"

print(ans)

Submission status: Accepted

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

if len(S) % 2 == 0:
    if S[:n] == S[n:]:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Accepted

Solution code:
N = int(input())
S = input()
if N == 1:
  print("No")
  exit()
rep_cnt = N / 2
s1 = []
s2 = []
for i, s in enumerate(S):
  if i < rep_cnt:
    s1.append(s)
  else:
    s2.append(s)
if s1 == s2:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
n = int(input())
S = list(input())
S1 = []
for i in range(n // 2):
    s = S.pop(0)
    S1.append(s)
if n % 2 == 1 or S1 != S:
    print('No')
else:
    print('Yes')

Submission status: Accepted

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

Submission status: Accepted

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

a = N//2

f = S[a:]
b = S[:a]

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

Submission status: Accepted

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

t = s[:n//2]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:


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

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

Submission status: Accepted

Solution code:
#!python3.4.3

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

if s[t:] in s[:t]:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

if not len(s)%2 == 0:
    ans="No"

else:
    l=int(len(s)/2)
    s1=str(s[:l])

    if s == s1 + s1:
        ans="Yes"
    else:
        ans="No"

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

n=int(input())
s=input()
l=[]
m=[]
if n%2==1:
  print("No")
  sys.exit()
for i in range(n//2):
  l.append(s[i])
for _ in range(n//2,n):
  m.append(s[_])
print("Yes" if l==m else "No")

Submission status: Accepted

Solution code:
import math

n = int(input())
a = list(input())

even = math.floor(n/2)

b=a[:even]
c=a[even:]

if b==c:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

if N%2 == 1:
  print('No')
else:
  for a,b in zip(S[:N//2],S[N//2:]):
    if a != b:
      print('No')
      exit()
  print('Yes')

Submission status: Accepted

Solution code:
n = int(input())
s = str(input())
t = int(n/2)

if n%2==1:
  print('No')
else:
  if s[:t]==s[t:]:
    print('Yes')
  else:
    print('No')

Submission status: Accepted

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

Flag = 0

if N % 2 == 0:
    if S[:N//2] == S[N//2:]:
        Flag = 1


if Flag == 1:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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'
n=int(input())
a=input()
print(e(a))

Submission status: Accepted

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

if(N % 2) == 1:
    print('No')
else:
    for a in range(n):
        if not S[a] == S[n + a]:
            print('No')
            flag = False
            break
    if flag == True:
        print('Yes')

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

else:
    S1 = S[:len(S)//2]
    S2 = S[len(S)//2:]
    
    if S1 == S2:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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):
        if b[i]!=b[i+a//2]:
            count+=1
    if count==0:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

if N % 2 == 1:
    print("No")
    sys.exit()

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

Submission status: Accepted

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

Solution code:
n = int(input())
s = input()
ls = list(s)
l1 = []
l2 = []
if n % 2 == 1:
    print('No')
else:
    for i in range(len(s)//2):
        l1.append(ls[i])
    for i in (range(len(s)//2, n)):
        l2.append(ls[i])
    if l1 == l2:
        print(('Yes'))
    else:
        print('No')

Submission status: Accepted

Solution code:
#data = list(map(int,input().split()))
N = int(input())
S = input()

n = int(N/2)

A = ""

for i in range(n):
    A += S[i]

#print(A)

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
  n = int( input() )
  s = input()
  
  cnt = True
  
  if len(s) % 2 == 1:
    cnt = False
    
  for i in range( int(len(s)/2) ):
    if(s[i] == s[i + int(len(s)/2) ]):
      continue
    else:
      cnt = False
      
  if cnt == True:
    print("Yes")
  else:
    print("No")

if __name__ == '__main__': main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import re

N = int(input())

def check(s):
    return re.fullmatch(r"(.+?)\1", s)

if N % 2 == 0 and check(input()):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(200000)
input = sys.stdin.readline
def ii(): return int(input())
def mi(): return map(int, input().rstrip().split())
def lmi(): return list(map(int, input().rstrip().split()))
def fi(): return float(input())
def mfi(): return map(float, input().rstrip().split())
def lmfi(): return list(map(float, input().rstrip().split()))
def li(): return list(input().rstrip())
def debug(*args, sep=" ", end="\n"): print("debug:", *args, file=sys.stderr, sep=sep, end=end) if not __debug__ else None
def exit(*arg): print(*arg); sys.exit()
# template


def main():
    N = ii()
    S = li()
    flag = True
    if N % 2 == 1:
        exit("No")
    for i in range(N // 2):
        if S[i] != S[i + N // 2]:
            flag = False
    if flag:
        print("Yes")
    else:
        print("No")
    return


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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