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")
    exit()
a=s[0:len(s)//2] 
b=s[len(s)//2 if len(s)%2 == 0 else ((len(s)//2)+1):]

if a.__eq__(b):
    print("Yes")
    exit()
else:
    print("No")

Submission status: Accepted

Solution code:
S=int(input())
T=list(input())
t=S//2
p=0
for i in range(t):
    if S%2==1:
        p=-1
        break
    elif T[i]!=T[i+t]:
        p=-1
        break
if p==-1 or t==0:
    print("No")
elif p==0:
    print("Yes")

Submission status: Accepted

Solution code:
n = int(input())
s = input()
if n % 2 == 1:
    print('No')
else:
    mid = int(n/2)
    if s[0:mid] == s[mid: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:
r = int(input())
s = input()

if r%2 == 1:
  print("No")
  exit()
m = str(s[0:r//2])

if m*2 == 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()
if (n%2 == 1):
  print("No")
else:
  c = 0
  for i in range(int(n/2)):
    if (s[i] != s[i + int(n/2)]):
      c = 1
  if (c == 0):
    print("Yes")
  else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
nn = input()
n = str(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
S = input()
if n & 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')
    exit()
for i in range(int(N/2)):
    if S[i]!=S[int(N/2)+i]:
        print('No')
        exit()
print('Yes')

Submission status: Accepted

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

Submission status: Accepted

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

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

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

if N % 2 != 0:
  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 len(s) % 2 == 1:
  print("No")

elif s[0:n//2] == s[n//2:len(s)]:
  print("Yes")

else:
  print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
sys.setrecursionlimit(10**7)

def _S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

def main():
    N = I()
    S = _S()
    print("Yes" if S[:int(len(S)/2)]==S[int(len(S)/2):] else "No")

main()

Submission status: Accepted

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

Submission status: Accepted

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

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())
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:
n=int(input())
s=input()
t=""
for i in range(len(s)//2):
    t += s[i]

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

q = input()
a = list(q)

if N % 2 == 1:
  print('No')
  
elif N % 2 == 0:
  b = [a] * int(N/2)
  c = [a] * int(N/2)
  for i in range(int(N/2)):
    b[i] = a[i]
  for j in range(int(N/2)):
    c[j] = a[int(j)+int(N/2)]
  if b == c:
    print('Yes')
  else:
    print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s = input()
if n%2 == 0:
    cnt = 0
    for i in range(n//2):
        if s[i] == s[i + n//2]:
            cnt += 1
            if cnt == n//2:
                print("Yes")
                break
        else:
            print("No")  
            break
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 = str(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:
  for i in range(n//2):
    if s[i] != s[n//2 + i]:
      print("No")
      break
  else:
    print("Yes")

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()
u=len(s)
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:
from sys import stdin
import sys
import math
from functools import reduce
import functools
import itertools
from collections import deque,Counter,defaultdict
from operator import mul
import copy
# ! /usr/bin/env python
# -*- coding: utf-8 -*-
import heapq
sys.setrecursionlimit(10**6)
# INF =  float("inf")
INF = 10**18
import bisect
import statistics
mod = 10**9+7
# mod = 998244353

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())
s = input()
ct = 0
if n % 2:
    print("No")
    exit()
else:
    m = n//2
    for i in range(m):
        if s[i] != s[i+m]:
            ct +=1
if ct == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
s=input()
r=''
for i in s:
    r+=i
    if(r*2==s):
        print("Yes")
        break
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
i = input()
s = 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:
N = int(input())
S = list(input())
ans = 'No'
n = int(N / 2)
if S[:n] == S[n:]:
    ans = 'Yes'
print(ans)

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())
if N%2 == 1:
  print("No")
  exit()

S = str(input())
mid = N//2
s1 = S[:mid]
s2 = S[mid:]
if s1 == s2:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
S = input().strip()
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()
flag = True if N % 2==0 else False

for i in range(N//2):
    if S[i] != S[N//2 + i]:
        flag = False
if flag:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
s = input()
ans = 'No'

if n%2 == 0:
    mid = int(n/2)
    if s[:mid] == s[mid:]:
        ans = 'Yes'

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

T = S[:int(len(S)/2)]

S_alt = T + T

if S == S_alt:
    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")
    exit()

print("No")

Submission status: Accepted

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

Submission status: Accepted

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

if len(S)%2 != 0:
    print("No")
    sys.exit(0)
else:
    i = int(len(S)/2)
    T = S[0:i]
    if T*2 == S:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


ans="Yes"
for i in range(len(s)//2):
    if s[i]!=s[i+len(s)//2]:
        ans="No"
        break

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

Submission status: Accepted

Solution code:
n = int(input())
s = str(input())
if n%2==1:
    print('No')
else:
    m = int(n/2)
    #isError = False
    #for i in range(m):
    #    if s[i]!=s[i+m]:
    #        isError = True
    #        break
    #if isError:
    #    print('No')
    #else:
    #    print('Yes')
    #print(s[:m])
    #print(s[m:])
    if s[:m]!=s[m:]:
        print('No')
    else:
        print('Yes')

Submission status: Accepted

Solution code:
n =input()
s=input()
if len(s)%2==0:
    if s[len(s)//2:] == s[:len(s)//2]:
        print('Yes')
    else:
        print('No')
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=str(input())
flg = True
if len(S)%2 != 0:
    print("No")
else:
    for i in range(len(S)//2):
        if S[i] != S[i+len(S)//2]:
            print("No")
            flg = False
    if flg == True:
        print("Yes")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
S = input()
n = N/2
if S == S[int(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()

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

Submission status: Accepted

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


def some(s):
    a, b = s[:n//2], s[n//2:]
    if n % 2 or a != b: return "No"

    return "Yes"


print(some(s))

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s = input()
if n % 2 != 0:
    print('No')
    exit()
if s[: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:
  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()

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

Submission status: Accepted

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

if N % 2 == 0:
  n = N // 2
  s = S[0:n]

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

A = S[:N//2]
B = S[N//2:]

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

Submission status: Accepted

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

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

Submission status: Accepted

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

    cond = S[:N // 2] == S[N // 2:]

    print('Yes' if cond else 'No')


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
S = list(input())
ans = 'No'
if N%2 == 0:
  num = int(N/2)
  pre = S[:num]
  suf = S[num:]
  if pre == suf: ans = "Yes"
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from fractions import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import product, combinations,permutations
from copy import deepcopy
import sys
sys.setrecursionlimit(4100000)



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

    mid = N // 2

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))

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

if (n % 2 != 0):
    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()

if len(s)%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())
a=input()

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

t1=a[0:int(n/2)]
t2=a[int(n/2):n]

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

Submission status: Accepted

Solution code:
n=int(input())
s=list(input())
if n%2==1:
    print("No")
elif s[: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:
import sys
n=int(input())
s=input()
if n%2==1:
    print("No")
    sys.exit()
else:
    s1=s[:n//2]
    s2=s[n//2:]
    # print(s1,s2)
    if s1==s2:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

for i in range(1, n):
    if s[0] == s[i] and s[:i] == s[i:]:
        print("Yes")
        break
else:
    print("No")

Submission status: Accepted

Solution code:
N = int(input())

ret = False
if N % 2 == 0:
  S = input()
  if S[:N//2] == S[N//2:]:
    ret = True

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

Submission status: Accepted

Solution code:
# abc145_b.py
# https://atcoder.jp/contests/abc145/tasks/abc145_b

# B - Echo /
# 実行時間制限: 2 sec / メモリ制限: 1024 MB
# 配点 : 200点

# 問題文
# 正整数 N及び、長さ N の英小文字から成る文字列 Sが与えられます。
# この文字列が、ある文字列を二度繰り返したものであるかを判定してください。 
# 則ち、文字列 Tであって、 S=T+Tとなるものが存在するかを判定してください。

# 制約
#     1≤N≤100
#     Sは英小文字から成る|S|=N

# 入力
# 入力は以下の形式で標準入力から与えられる。
# N
# S

# 出力
# Sが文字列を二度繰り返したものであるならば Yes と、そうでないならば No と出力せよ。

# 入力例 1
# 6
# abcabc

# 出力例 1
# Yes

# T=abc とおくと、 S=T+Tとなります。

# 入力例 2
# 6
# abcadc

# 出力例 2
# No

# 入力例 3
# 1
# z

# 出力例 3
# No


global FLAG_LOG
FLAG_LOG = False


def log(value):
    # FLAG_LOG = True
    # FLAG_LOG = False
    if FLAG_LOG:
        print(str(value))


def calculation(lines):
    S = lines[1]
    N = int(lines[0])
    # N, M = list(map(int, lines[0].split()))
    # values = list(map(int, lines[1].split()))
    # values = list(map(int, lines[2].split()))
    # values = list()
    # for i in range(N):
    #     values.append(int(lines[i]))
    # valueses = list()
    # for i in range(N):
    #     valueses.append(list(map(int, lines[i+1].split())))

    if N % 2 != 0:
        result = 'No'
    else:
        n = int(N/2)
        log(f'S[:n]=[{S[:n]}], S[n:]=[{S[n:]}]')
        if S[:n] == S[n:]:
            result = 'Yes'
        else:
            result = 'No'

    return [result]


# 引数を取得
def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines


# テストデータ
def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['6', 'abcabc']
        lines_export = ['Yes']
    if pattern == 2:
        lines_input = ['1', 'abcadc']
        lines_export = ['No']
    if pattern == 3:
        lines_input = ['1', 'z']
        lines_export = ['No']
    return lines_input, lines_export


# 動作モード判別
def get_mode():
    import sys
    args = sys.argv
    global FLAG_LOG
    if len(args) == 1:
        mode = 0
        FLAG_LOG = False
    else:
        mode = int(args[1])
        FLAG_LOG = True
    return mode


# 主処理
def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(2)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    # if mode > 0:
    #     print(f'lines_input=[{lines_input}]')
    #     print(f'lines_export=[{lines_export}]')
    #     print(f'lines_result=[{lines_result}]')
    #     if lines_result == lines_export:
    #         print('OK')
    #     else:
    #         print('NG')
    # finished = time.time()
    # duration = finished - started
    # print(f'duration=[{duration}]')


# 起動処理
if __name__ == '__main__':
    main()

Submission status: Accepted

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

one = S[:N//2]
two = S[N//2:]

if one == two:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
#

import sys
input=sys.stdin.readline

def main():
    N=int(input())
    S=input().strip("\n")
    if N%2==1:
        print("No")
    elif S[:(N//2)]==S[(N//2):]:
        print("Yes")
    else:
        print("No")
    
    
    
if __name__=="__main__":
    main()

Submission status: Accepted

Solution code:
n=int(input())

s=input()

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


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

    if N % 2 == 1:
        ans = "No"
    else:
        if S[:N // 2] == S[N // 2:]:
            ans = "Yes"
        else:
            ans = "No"

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

if '__main__' == __name__:
    resolve()

Submission status: Accepted

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