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 = 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())

passage = input()

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

else:
    split = int(num / 2)
    
    if passage[0:split] == passage[split:]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
S = input()
st = []
if N % 2 == 0:
    num = int(N/2)
    st = S[0:num:None]
    if S.replace(st, "", 2) == "":
        print("Yes")
        exit()
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==1 or s[:n//2]!=s[n//2:] :
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
a = int(input())
b = input()

if b[:a//2] == b[a//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())
if n % 2 == 1:
  print('No')
else:
  t = input()
  i = len(t)//2
  if t[:i] == t[i:]:
    print('Yes')
  else:
    print('No')

Submission status: Accepted

Solution code:
x = int(input())
y = input()
if x % 2 == 1:
    print('No')

else:
    half = x // 2
    y_1,y_2 = y[:half],y[half:]
    if y_1 == y_2:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

if N % 2 == 0:
    c = N // 2
    for i in range(c):
        if S[i] != S[i+c]:
            print("No")
            exit()
            
    print("Yes")
        
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
lst = input()
l_even = lst[:(n//2)]
l_eleven = lst[(n//2 ):]
#print(l_even)
if n%2 ==1:
  print("No")
elif l_even == l_eleven:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
n = int(input())
s = input()
if not n%2 == 0:
    print('No')
    sys.exit()

k = n//2
for i in range(k):
    if not s[i] == s[i+k]:
        print('No')
        sys.exit()
print('Yes')

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=list(input())
if n%2!=0:
    print("No")
else:
    half=n//2
    ans="Yes"
    for i in range(half):
        if s[i]!=s[i+half]:
            ans="No"
            break
    print(ans)

Submission status: Accepted

Solution code:
n = int(input())
s = input()
l = [a for a in s]
if len(l)%2 == 1:
    print("No")
    exit()
n2 = int(n/2)
if "".join(l[:n2]) == "".join(l[n2:]):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

bool = True
if n % 2 == 1 :
    bool = False #奇数を除く

h = int (len(s) / 2)
#print (h)
strat_str = s[:h]
end_str = s[h:]
#print (strat_str)
#print (end_str)

if strat_str != end_str :
    bool = False
'''
half_n = n / 2
for i in range(half_n) :
    if s[i] != s[n/2 + i] :
        bool = False
        break #条件にマッチしないものを除く
'''

if bool == True :
    print ("Yes")
else :
    print ("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,a=open(0);
n=int(n);
print("YNeos"[a[:n//2]!=a[n//2:-1]::2])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
str_num = input()
input_str = input()
input_array = list(input_str)

n = 0
int_str_num =int(str_num)

if int_str_num % 2 == 0:
    half_str_num = int_str_num/2
    int_half_str_num = int(half_str_num)
    for i in range(int_half_str_num):
        if input_array[i] == input_array[i+int_half_str_num]:
            n = n + 1
    if n == half_str_num:
        print('Yes')
    else:
        print('No')
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:

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

if n%2 != 0:
    print("No")
elif s[:x] == s[x:]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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


    for e1,e2 in zip(l,r):
        if e1 == e2:
            pass
        else:
            print("No")
            exit()
    
    print("Yes")

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

S_length = len(S)
mid = int(S_length / 2)

if S[:mid] == S[mid:]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
_ = input()
s = input()
m = len(s)//2
 
print('Yes') if s[:m] == s[m:] else print('No')

Submission status: Accepted

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

Submission status: Accepted

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

ans = "No"
if N % 2 == 0:
  S1,S2 = S[:(N//2)],S[(N//2):]
  if S1 == S2:
    ans = "Yes"
print(ans)

Submission status: Accepted

Solution code:
n=int(input())
t=input()
T=list(t)

num=round(n/2)
 

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

Submission status: Accepted

Solution code:
N = int(input())
T = input()
if N%2 == 1:
  print('No')
else:
  for i in range(N//2):
    if T[i] != T[i+N//2]:
        print('No')
        break
    if i == N//2-1:
        print('Yes')

Submission status: Accepted

Solution code:
x = int(input())
y = str(input())
if x%2 == 1:
    print('No')
    exit()
l = int(x/2)
before = y[:l]
after = y[l:]
print('Yes' if before == after else 'No')

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7)
INTMAX = 9223372036854775807
INTMIN = -9223372036854775808
MOD = 1000000007
def POW(x, y): return pow(x, y, MOD)
def INV(x, m=MOD): return pow(x, m - 2, m)
def DIV(x, y, m=MOD): return (x * INV(y, m)) % m
def LI(): return [int(x) for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LS(): return input().split()
def II(): return int(input())

N=II()
S=input()
if (N%2):
    print("No")
    exit()

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

def main(N,S):
    N = int(N)
    if N%2 == 1:
        print('No')
    else:
        l=int(N/2)

        S1 = S[:l]
        S2 = S[-l:]

        if S1 == S2:
            print('Yes')
        else:
            print('No')


main(N,S)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
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() #文字列の入力は配列になる
sl = len(S) // 2

if S[:sl] == S[sl:] :
    print("Yes")
else :
    print("No")

Submission status: Accepted

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

if len(s)%2 != 0: print("No")
else:
  c = n//2
  t = s[:c]
 
  if 2*t ==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())
if N%2==1:
    print("No")
    exit()
S=input()
T1=""
T2=""
for i in range(N):
    if i<N//2:
        T1+=S[i]
    else:
        T2+=S[i]
if T1==T2:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

t = s[:n//2]
ans = 'Yes' if s == t + t else 'No'

print(ans)

Submission status: Accepted

Solution code:
Yes = "Yes"
No = "No"


def main():
    N = int(input())
    S = input()
    if not N % 2:
        print(Yes if S[: N // 2] == S[N // 2:] else No)
    else:
        print(No)
    return


main()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
S = input()
H = list(S)
P = len(H)
oo = []
ll = []
if P%2 == 0:
  for a in range (0,int(N/2)):
    oo.append(H[int(a)])
    ll.append(H[int(a+N/2)])
  if oo == ll :
    print("Yes")
  else :
    print("No")
else :
  print("No")

Submission status: Accepted

Solution code:
##(A,B,C,D)=map(int,input().split())

N=int(input())
##c=list(map(int, input().split()))
c=str(input())
k=int(0)


if(N%2==1):
    print("No")
else:
    N=int(N/2)
    for i in range(N):
        if(c[i]!=c[N+i]):
            k=1
    if(k==1):
        print("No")
    else:
        print("Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# Contest: AtCoder Beginner Contest 145 (https://atcoder.jp/contests/abc145)
# Problem: B: Echo (https://atcoder.jp/contests/abc145/tasks/abc145_b)

def rint():
    return int(input())


def rints():
    return list(map(int, input().split()))


n = rint()
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 = str(input())
t = s[:n//2]
u = s[n//2::]
if t == u:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-


def main():
    n = int(input())
    s = input()

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

n_s_1 = []
n_s_2 = []

if a%2 :
    print("No")
    exit()

for i in range(int(a/2)):
    n_s_1 += s[i]
    n_s_2 += s[i + int(a/2)]

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

Submission status: Accepted

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

if a%2 :
	print("No")
	exit()
  
n_str_1 = ""
n_str_2 = ""
  
for i in range(int(a/2)):
    n_str_1 += str[i]
    n_str_2 += str[i+int(a/2)]

if n_str_1 == n_str_2 :
	print("Yes")
else :
  	print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

before = S[: N // 2]
after = S[N // 2 :]

if before == after:
    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 print('No')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
s = list(input())
t = 0
a = 'No'

if n % 2 == 0:
  t = int(n / 2)
  for i in range(t):
    if s[i] == s[t+i]:
      pass
    else:
      a = 'No'
      break
    a = 'Yes'

print(a)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

main()

Submission status: Accepted

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

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

if N%2:
  print("No")
else:
  for i in range(0, int(N/2)):
    if S[i] == S[i+int((N/2))]:
      pass
    else:
      print("No")
      sys.exit()
  print("Yes")

Submission status: Accepted

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

if (n % 2) == 0 :
  tlen = int(n / 2)
  t = s[:tlen]
#  print(t)
  if s == (t + t) :
     result = "Yes"
  
print(result)

Submission status: Accepted

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

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

N = int(N / 2)
s = S[:N]

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

Submission status: Accepted

Solution code:
n=int(input())//2;s=input();print('Yes' if s[:n] == s[n:] else '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:
n = int(input())
s = input()

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

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

Submission status: Accepted

Solution code:
N = int(input())
S = input()
if N % 2 != 0:
    print("No")
else:
    arr = list(S)
    s_len = len(arr) // 2
    if arr[s_len:] == arr[:s_len]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

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 N % 2 > 0:
    print('No')
else:
    N = int(N / 2)
    first_half = S[N:]
    second_half = S[:N]
    if (first_half == second_half):
        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:
N = int(input())
S = input()
print('Yes' if N % 2 == 0 and S == S[:N // 2] * 2 else 'No')

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if N % 2 != 0:
    print("No")
else:
    center = N // 2
    for i in range(0,center):
        if S[i] != S[i+center]:
            print("No")
            break
        if i == center-1:
            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:
n = int(input())
s = input()
if n % 2 == 1:
  print("No")
else:
  s1 = s[:(n//2)]
  s2 = s[(n//2):]
  if s1 == s2:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

Solution code:
def judgeString(n,x):
  if n % 2 == 1:
    return "No"
  for i in range(n//2):
    if x[i]!=x[i+(n//2)]:
      return "No"
  return "Yes"

n=int(input())
x=input()
print(judgeString(n,x))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input()) #文字列の長さ
S = input() #受け取る文字列
li = list(S) #一文字づつ配列に分割
judge = True
n = int(N/2)
if N%2==1:
  judge = False
else:
  for number in range(n):
    if not li[number]==li[number+n]:
      judge = False
if judge:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-
#入力
n = int(input())
s = input()

if n == 1:
	flag = 0
else:
	for i in range(n):
		if (s[:i] == s[i:]):
			print("Yes")
			flag = 1
			exit()
		else:
			flag = 0

if flag == 0 :
	print("No")

Submission status: Accepted

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

Submission status: Accepted

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

def main():
    n=int(input())
    s=input()
    if n%2 or s[:n//2] != s[n//2:]:
        print('No')
    else:
        print('Yes')

main()

Submission status: Accepted

Solution code:
n = input()
s = input()
a = {True: 'Yes', False: 'No'}
print(a[s[:len(s)//2] == s[len(s)//2:]])

Submission status: Accepted

Solution code:
n = int(input())
st = input()
if len(st) == 1:
  print("No")
elif n % 2 != 0:
  print("No")
else:
    first = st[n//2:]
    last = st[:n//2]
    if first == last:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

if N % 2 == 1:
    print('No')
else:
    half = int(N/2)
    if S[:half] == S[half:]:
        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):N]):
    
    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()
w = n // 2
if s[:w] == s[w:]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())

s = input()

ans = True
if n%2 == 1 :
  ans = False
else :
  j = n//2
  i, k = 0, j
  while i < j:
    if s[i] != s[k]:
      ans = False
    i+=1
    k+=1
if ans :
  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:
import io
import sys

def main():
    s = int(input())
    li = list(input())

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

    front = []
    back = []

    for i in range(int(s/2)):
    	front.append(str(li[int(i)]))

    for j in range(int(s/2), s):
    	back.append(str(li[int(j)]))


    if (front == back):
    	print ('Yes')
    else:
    	print ('No')


if __name__ == '__main__':
	main()

Submission status: Accepted

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

Submission status: Accepted

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

if len(S) == 1:
    flg = False

elif len(S)%2 == 1:
    flg = False
else:
    num = len(S) // 2

    for i in range(num):
        if S[i] == S[i+num]:
            flg = True
        else:
            flg = False
            break

if flg == True:
    print("Yes")

else:
    print("No")

Submission status: Accepted

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

b = a[0:n//2]
c = a[n//2:n]

#print(b)
#print(c)

if n!=1:
	if b==c :
		print('Yes')
	else:
		print('No')
else:
	print('No')

Submission status: Accepted

Solution code:
N = int(input())
S = input()
cnt = 0
for i in range(N) :
    if S[0:i] == S[i:N] :
        print("Yes")
        cnt = 1
        break
if cnt == 0 :
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
N = int(stdin.readline().rstrip())
S = stdin.readline().rstrip()
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()

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

Submission status: Accepted

Solution code:
def main():
    n = iread()
    t = sread()
    s = t[:int(n/2)]
    if s == t[int(n/2):]:
        print("Yes")
    else:
        print("No")


def iread():
    return int(input())


def sread():
    return input()


def aread(t="int"):
    if t == "int":
        ret = [int(i) for i in input().split()]
    elif t == "str":
        ret = list(input().split())
    return ret


def scan():
    return list(map(int, input().split()))


if __name__ == '__main__':
    main()

Submission status: Accepted

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


if __name__ == '__main__':
    b()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
s=input()
if n%2!=0:
  print('No')
  exit()
dif=n//2
ans='Yes'

for i in range(dif):
    if s[i]!=s[i+dif]:
        ans='No'
        break

print(ans)

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 = str(input())

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import copy
import heapq

def j(n):
    if n:print("Yes")
    else:print("No")
    exit(0)
rem = 10 ** 9 + 7

"""
def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")
"""

def ip():
    return int(input())
def iprow():
    return [int(i) for i in input().split()]
def ips():
    return (int(i) for i in input().split())
def ipmultiplerow(n):
    a = []
    for i in range(n):
        a.append(ip())
    return a
def printrow(a):
    for i in a:
        print(i)

n  = ip()
a = input()
m = n//2
b = a[:m]
c = a[m:]
if b==c:j(1)
j(0)

Submission status: Accepted

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

if N%2 == 1:
    print('No')
else:
    if S[0:int(N*0.5)] == S[int(N*0.5):N]:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
S = input()
if N % 2 == 1:
    print("No")
else:
    m = N // 2
    if S[:m] == S[m:]:
        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 =str(input())

S_1=S[:(N//2)]
S_2=S[(N//2):]

if S_1 == S_2:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if N % 2 !=0:
  print('No')
else:
  half = int(N / 2)
  
  for i in range(half):
    diff += S[i]
  
  diff += diff
  
  if S == diff:
    print('Yes')
  else:
    print('No')