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, S = input(), input()
N = int(N)
S = S.strip()
if N % 2 == 1:
  print("No")
elif S[:N//2] == S[N//2:]:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

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

if N%2==0:
#  print(S[0:N//2],S[N//2:N])
  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()
ans = "Yes"
if N%2==0:
    M = N//2
    for i in range(M):
        if S[i] != S[i+N//2]:
            ans = "No"

else:
    ans = "No"

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
listnum = int(input())
string = input()

halfnum = listnum // 2
halfstr = string[0:halfnum]
if string == halfstr + halfstr:
	print('Yes')
else:
	print('No')

Submission status: Accepted

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



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

Submission status: Accepted

Solution code:
a = int(input())
t = list(str(input()))
u = []
if a % 2 != 0:
    print('No')
else:
    for i in range(a//2):
        if t[i] != t[i + a//2]:
            u.append(1)
    if 1 in u:
        print('No')
    else:
        print('Yes')

Submission status: Accepted

Solution code:
N=int(input())
S=str(input())
if N%2==1:
  print('No')
else:
  f=True
  h=int(N/2)
  for i in range(0,h):
    if S[i]!=S[h+i]:
      f=False
  if f==True:
    print('Yes')
  else:
    print('No')

Submission status: Accepted

Solution code:
import sys
# -*- Coding: utf-8 -*-
n = int(input())
sentence = list(input())
i=0
s=0
s=n//2
#print(s)
if n%2 == 1:
    print('No')
    sys.exit()
#ここまで大丈夫
else:
    #print(k)
    for i in range(s):
       if sentence[i] == sentence[s+i]:
           pass
       else:
           print('No')
           sys.exit()

print('Yes')

#競技プログラミングは人の誤りを仮定しない幸せな世界

Submission status: Accepted

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

if N%2==0:
    for a in range(0,(round(N/2))):
        if S[a]==S[(round(N/2))+a]:
            count=count+1
        else:
            break
else:
    pass

if count==(N/2):
    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()
a=[]
half=int(N/2)
count=0
if N%2==1:
  print("No")
else:
  for i in range(half):
    if S[i]==S[i+half]:
      count+=1
  
  if count==half:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
t = list(str(input()))
if n%2 == 1:
    print("No")
else:
    ans = True
    a = ["" for i in range(int(n/2))]
    b = ["" for i in range(int(n/2))]
    for i in range(int(n/2)):
        a[i] = t[i]
        b[i] = t[int(n/2)+i]
    for i in range(int(n/2)):
        ans = ans and a[i] == b[i]
    if ans:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
n = int(input())
s = input()
if n % 2:
    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()

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

Submission status: Accepted

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

if n%2 == 0:
    l = int(n/2)
    for i in range(l):
        if s[i] != s[i+l]:
            break
        if i == l-1:
            f = 1

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

Submission status: Accepted

Solution code:
data_len = int(input())
data = input()
if data[0:int(data_len / 2)] == data[int(data_len / 2):data_len]:
    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()

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

Submission status: Accepted

Solution code:
n=int(input())
s=list(input())
x=int(n/2)
b=[]
ans=[]
if n % 2 == 0: 
    for i in range(x):
       a=s.pop(0) 
       b.append(a)
else:
    ans="No"
if b == s:
    ans="Yes"
else:
    ans="No"
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

half_N = int(N / 2)
if N % 2 == 0 and N != 2 and S[0:half_N] == S[half_N:len(S)]:
    print('Yes')

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

else:
    print('No')

Submission status: Accepted

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


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

Submission status: Accepted

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
            break
    return flg


if n % 2 != 0:
    flg = False
else:
    flg = string_match(s)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
N = int(input())
# 文字列の入力
S = str(input())

#入力文字列Sの文字数の半分の情報を取得
half = len(S) // 2

# 文字列Sの分割
T1, T2 = S[:half], S[half:]

ANS = 'No'

if(T1==T2):
    ANS='Yes'

print(ANS)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

for x in range(0,N//2):
  if S[x:x+1] != S[x+N//2:x+N//2+1]:
      print("No")
      exit()

print("Yes")

Submission status: Accepted

Solution code:
N=int(input())
s=list(input())
if N%2==1:
  print('No')
else:
  t=s[:int(N/2)]
  if t*2==s:
    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:
n=int(input())
li=list(input())
if n%2==0:
  t=int(n/2)
  a=li[:t]
  b=li[-t:]
  if a==b:
    print('Yes')
  else:
    print('No')
else:
  print('No')

Submission status: Accepted

Solution code:
number_of_word= int(input())
repeat_lenth=int(number_of_word/2)
tmp_word= input()

if (number_of_word % 2) == 0:

  if tmp_word[:repeat_lenth] == tmp_word[repeat_lenth:]:
    print ('Yes')
  else:
    print ('No')
else:
  print ('No')

Submission status: Accepted

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)]
  if(S==T+T):
    ans ="Yes"
print(ans)

Submission status: Accepted

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

output = 'Yes'
if N%2==1:
    output = 'No'
else:
    M = int(N/2)
    for i in range(M):
        if S[i]!=S[i+M]:
            output = 'No'

print(output)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    n = int(input())
    s = input()
    if len(s) >= 2 and len(s) % 2 == 0 and s[:len(s)//2] == s[len(s)//2:]:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

n=int(input())
s=input()
k=n//2
ans=0
if n%2 !=0:
    print('No')
    sys.exit()
for i in range(k):
    if s[i]==s[k+i]:
        ans+=1
    
if ans==k:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
S =int(input())
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: Accepted

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

Submission status: Accepted

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

Solution code:
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)
  if s.count(tl) == 2:
    print('Yes')
  else:
    print('No')

Submission status: Accepted

Solution code:
N = int(input())
S = str(input())
K = list()
for i in S:
  K.append(i)
  

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



else:
  A = K[0:N//2]
  B = K[N//2:N+1]
  
  if A == B:
    print("Yes")
    
  else:
    print("No")

Submission status: Accepted

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

first = s[:num]
second = s[num:]

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

Submission status: Accepted

Solution code:
import sys

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

i = int(N / 2)


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

Submission status: Accepted

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

Submission status: Accepted

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:
    print("No")
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:N]:
    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:
##B
n = int(input())
s = str(input())

n1 = int(n/2)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

import sys
def input():
	return sys.stdin.readline().strip()

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

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

Submission status: Accepted

Solution code:
import sys


def work():
    n = int(input())
    s = sys.stdin.readline()
    if n % 2 == 1: print "No"
    else :
        for i in range(n / 2):
            if s[i] != s[i + n / 2]:
		print "No"
		return
	print "Yes"

work()

Submission status: Accepted

Solution code:
N = int(input())
S = input()
 
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 s[:n//2] == s[n//2:]:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
S=str(input())
L=""
if N%2!=0:
  print("No")
else:
  for i in range(int(len(S)/2)):
  		L+=S[i]
  if L*2==S:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

Solution code:
n=int(input())
s=input()
f=True
if n%2==1:
    print('No')
else:
    l=n//2
    for i in range(l):
        if not s[i]==s[i+l]:
            f=False
            break
    if f:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
def echo():
    n = int(input())
    s = input()
    t = ""

    for i in range(0, int(n / 2)):
        t += s[i]



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

echo()

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:
a=int(input())
S=input()
if a%2 != 0:
  print("No")
else:
  b=0
  while	b<=a//2-1 and 0<=b:
        if S[b]==S[a//2+b]:
          b=b+1
        else:
          b=-1
  if b==a//2:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

Solution code:
n =int(input())
s = list(input())
a = ""
b = ""
for i in range(n):
  if i <= n/2 -1:
    a += s[i]
  else:
    b += s[i]
if a==b:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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):
        if a[i]!=a[i+k]:
            current=current*0
        i+=1
    if current==1:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

q, r = divmod(N, 2)

if r != 0:
    print('No')
else :
    T1 = S[:q]
    T2 = S[q:]
    if T1 == T2:
        print('Yes')
    else :
        print('No')

Submission status: Accepted

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

if s[:h] == s[h:]:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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

if N%2 == 0:
    jdg_1 = S[0:int(N/2)]
    jdg_2 = S[int(N/2):int(N)]
    if jdg_1==jdg_2:
      out = 'Yes'
    else:
      out = 'No'
else:
  out = 'No'

print(out)

Submission status: Accepted

Solution code:
N = int(input())
S = input()
S_half_length = len(S) // 2
s1 = S[0:S_half_length]
s2 = S[S_half_length:]
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:
    t = round(n / 2)
    if s[:t] == s[t:]:
       
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
def isConcate(N, S):
	if N % 2 != 0:
		return 'No'
	else:
		if S[:N//2] == S[N//2:]:
			return 'Yes'
		else:
			return 'No'

if __name__ == '__main__':
  N = int(input())
  S = input()
  print(isConcate(N, S))

Submission status: Accepted

Solution code:
n = int(input())
s = list(str(input()))
if n == 1:
  print('No')
  exit()
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: 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[:(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] * 2 == S:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n=int(input())
s=str(input())
import sys
l1=[]
l2=[]
if len(s)%2!=0:
 print("No")
 sys.exit()
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: Accepted

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

ans = 'No'
if N % 2 == 0:
    M = N // 2
    T = S[:M]
    if T == S[M:]:
        ans = 'Yes'

print(ans)

Submission status: Accepted

Solution code:
N = int(input())
S = list(map(str,input()))
center = round(len(S) / 2)
if S[:center] == S[center:]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

s1 = ""
s2 = ""

if(n % 2 == 0):
    for i, st in enumerate(string):
        if i < n/2:
            s1 = s1 + st
        else:
            s2 = s2 + st

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

Submission status: Accepted

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

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

c = int(n/2)

if s[:c]==s[c:]:
    print ("Yes")
    sys.exit()

print ("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys


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

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


if __name__ == '__main__':
    args = [input() for i in range(2)]
    main(int(args[0]), args[1])

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import sys

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

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

Submission status: Accepted

Solution code:
n = int(input())
s = 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==0:
   x=n//2
   if s[:x:]+s[:x:]==s:
      print("Yes")
   else:
      print("No")
else:
   print("No")

Submission status: Accepted

Solution code:
num = int(input())
word = input()
half = num // 2

#print(word[:half])
#print(word[half:])

if num % 2 == 1:
    print("No")


elif word[:half] == word[half:]:
    print("Yes")

else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
input()
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: Accepted

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

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

Submission status: Accepted

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

if N == 1:
    print('No')
else:
    if N % 2 == 1:
        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())
s=list(input())
c=0
if n%2 != 0:
    print('No')
    exit()
else:
    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: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s=list(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()
if N % 2 != 0:
    print("No")
else:
    if 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-1)%2 == 0):
    print('No')
else:
    K=int(N/2)
    T1=S[0:K]
    T2=S[K:]
    if(T1==T2):
        print("Yes")
    else:print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
S = input()
lst = list(S)
l = len(lst)

num = 0
#if N % 2 != 0:
#   print("No")
for i in range(N//2):
    if lst[i] == lst[i + N//2]:
        num += 1
if N % 2 != 0:
    print("No")
elif num == N//2:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import sys
input_num = int(input())
input_str = str(input())

if input_num % 2 == 1:
    print('No')
    sys.exit()
    
half_str = input_str[0:int(input_num/2)]
result = input_str.replace(half_str,"")
if result == "":
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
import sys
N = int(input())
S = input()
if N%2 != 0:
    print('No')
    sys.exit()
m = int(N/2)
for i in range(0, m):
    if S[i] != S[m+i]:
        print('No')
        sys.exit()
print('Yes')

Submission status: Accepted

Solution code:
n = int(input())

fin = n//2
s = input()

debut = s[0:fin]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

s = input()

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

Submission status: Accepted

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

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

    s_start = S[:N//2]
    s_end = S[N//2:]

    if s_start == s_end:
        print('Yes')
    else:
        print('No')
    return 0


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10000000)
# input = sys.stdin.readline
from bisect import *
from collections import *
from heapq import *
import functools
import itertools
import math
INF = float('inf')
MOD = 10**9+7

# nCk % mod
# def modCom(n, k, mod):
#     p, q = 1, 1
#     for i in range(n-k+1, n+1):
#         p = (p * i) % mod
#     for i in range(2, k+1):
#         q = (q * i) % mod
#     return p * pow(q, mod-2, mod) % mod
# 
# X, Y = map(int, input().split())
# l, r = -1, X//2
# while l+1 < r:
#     m = (l+r)//2
#     n = X-2*m
#     if 2*n+m > Y:
#         l = m
#     else:
#         r = m
# m = r
# n = X-2*r
# if 2*m+n == X and m+2*n == Y:
#     print(modCom(n+m, n, MOD))
# else:
#     print(0)


# N = int(input())
# xy = [None]*N
# for i in range(N):
#     x, y = map(int, input().split())
#     xy[i] = (x, y)
# ans = 0
# for vs in itertools.permutations(xy, N):
#     d = 0
#     for v1, v2 in zip(vs, vs[1:]):
#         d += ((v1[0]-v2[0])**2+(v1[1]-v2[1])**2)**0.5
#     ans += d
# for i in range(1, N+1):
#     ans /= i
# print(ans)



# r = int(input())
# print(r*r)


N = int(input())
S = input()
for i in range(N):
    T = S[:i]
    if T + T == S:
        print('Yes')
        exit()
print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s = list(input())
t_1 = list()
t_2 = list()
m = 1
if n % 2 == 0:
    for i in range(int(n / 2)):
        t_1.append(s[i])
        t_2.append(s[int(n / 2) + i])
else:
    m *= 0
    
for i in range(len(t_1)):
    if t_1[i] == t_2[i]:
        m *= 1
    else:
        m *= 0
        break
    
if m == 0:
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
s = input()
rev = 'Yes'

if not N % 2 == 0:
    rev = 'No'
    
if not s[:(N//2)] == s[(N//2):]:
    rev = 'No'

print(rev)

Submission status: Accepted

Solution code:
# 入力が10**5とかになったときに100ms程度早い
import sys
read = sys.stdin.readline


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_matrix(H):
    '''
    H is number of rows
    '''
    return [list(map(int, read().split())) for _ in range(H)]


def read_map(H):
    '''
    H is number of rows
    文字列で与えられた盤面を読み取る用
    '''
    return [read()[:-1] for _ in range(H)]


def read_col(H, n_cols):
    '''
    H is number of rows
    n_cols is number of cols

    A列、B列が与えられるようなとき
    '''
    ret = [[] for _ in range(n_cols)]
    for _ in range(H):
        tmp = list(map(int, read().split()))
        for col in range(n_cols):
            ret[col].append(tmp[col])

    return ret


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

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    N = int(input())
    T = input()
    middle = int(N / 2)
    target_str = T[0:(middle)] + T[0:(middle)]
    if (N % 2) == 0 :
        if (T == target_str):
            print('Yes')
            exit(0)
    print('No')
    exit(0)

Submission status: Accepted

Solution code:
n = int(input())
s = input()
def test(n,s):
    list=[]
    nn = int(n/2)
    for t in range(0, nn):
        list.append(s[t])
    T = ''.join(list)

    if s == (T + T):
        print('Yes')
    else:
        print('No')

test(n,s)