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

Submission status: Accepted

Solution code:
N = int(input())
S = input()
T = S[:(N+1)//2]
if S == T+T:
    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().rstrip()
if n % 2 == 1:
    print('No')
    exit()
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:])&(n%2==0):
    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):len(s)]: print('Yes')
else: print('No')

Submission status: Accepted

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

is_even = N % 2 == 0
S1 = S[0:int(len(S) / 2)]
S2 = S[int(len(S) / 2):]

answer = 'Yes' if is_even and S1 == S2 else 'No'

print(answer)

Submission status: Accepted

Solution code:
import sys

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

a = s[:int(len(s)/2)]
b = s[int(len(s)/2):]

if a==b:
    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:
import sys
input = sys.stdin.readline
from collections import Counter, deque

INF = float('inf')

""" Input
N, A, B = map(int, input().split())
A = list(map(int, input().split()))
D = [int(input()) for _ in range(N)]
"""

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a = int(input())
b = input()
ans =''
a_half = int(a / 2)
if a %2 == 0:
    ans += b[:a_half] + b[:a_half]
    if ans == b:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Submission status: Accepted

Solution code:
N=int(input())
if N%2==1:
  print("No")
  #偶数なら不適
else:
  s=input()
  b=N//2
  t=0
  for i in range (0,b):
    if s[i]==s[i+b]:
      t=t
    else:
      t=t+1
  if t==0:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#
# Written by NoKnowledgeGG @YlePhan
# ('ω')
#
#import math
#mod = 10**9+7
#import itertools
#import fractions
#import numpy as np
#mod = 10**4 + 7
"""def kiri(n,m):
  r_ = n / m
  if (r_ - (n // m)) > 0:
    return (n//m) + 1
  else:
    return (n//m)"""
  
def main():
  n = int(input())
  s = input()
  
  if 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()
l=int(len(s))
m=0
if l%2==0:
  a=s[0:l//2]
  b=s[l//2:l]
  for i in range(n//2):
    if a[i]!=b[i]:
      m+=1
  if m==0:
        print("Yes")
  else:
        print("No")
else:
  print("No")

Submission status: Accepted

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

num = N //2
##print(num)
##print(S[:num])
##print(S[num:N+1])

if S[:num] == S[num:N+1]:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip() 

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

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

if __name__ == '__main__':
    resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s = input()
ok = True
if n%2 == 1:
    ok = False
first = s[:n//2]
second = s[n//2:]
if first != second:
    ok = False
if ok: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 s[:n//2:]==s[n//2::]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N=int(input());S=input();print('YNeos'[S[:N//2]!=S[-N//2:]::2])

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

n = int(readline())
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 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

def input():
    return sys.stdin.readline().rstrip('\n')

N = int(input())
S = input()
#D = list(map(int, input().split()))

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

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 = str(input())
n = int(N/2)
right = S[:n]
left = S[n:]
if right == left:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
n=int(input())
s=input()
s1=s[:int(n//2)]
s2=s[int(n//2):]
if n%2!=0:
    print('No')
elif 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[:int(n//2)]==s[int(n//2):]:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

Solution code:
n, S = open(0).read().split()
q, r = divmod(int(n), 2)
if r == 0 and S[:q] == S[q:]:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

ans = 0

if n%2 == 0:
    a = list(s[0:n//2])
    b = list(s[(n//2):n+1])
    if a == b:
        ans = 1

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

Submission status: Accepted

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

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

if flag:
    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()

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

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:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    n=INT()
    s=STR()
    if s[:n//2]==s[n//2:]:
        print('Yes')
    else:
        print('No')
if __name__ == '__main__':
    do()

Submission status: Accepted

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

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

Submission status: Accepted

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

if n % 2 == 1:
    print('No')
    
else:
    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()
if N % 2 == 0 and S[:N//2] == S[N//2:]:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

t = s[:n//2]

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

Submission status: Accepted

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

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

S_len = len(S)
half_len = int(S_len/2)
#print(S[half_len:])
if(S[0:half_len] == S[half_len:]):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N = ir()
S = sr()
if N&1:
    answer = 'No'
else:
    answer = 'No' if any(x != y for x, y in zip(S[:N//2], S[N//2:])) else 'Yes'

print(answer)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))
n = ii()
s = input()
if n%2 != 0 or s[:len(s)//2] != s[len(s)//2:]:
    print('No')
else:
    print('Yes')

Submission status: Accepted

Solution code:
N = int(input())
S = input()
S1 = S[:N//2]
S2 = S[N//2:]

if N%2==1:
    print('No')
elif S1 == S2:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a=int(input())
b=input()
if a%2 == 0:
  if b[:a//2]==b[a//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:
    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()
T1 = S[0:N//2]
T2 = S[N//2:N]
print("Yes" if T1 == T2 else "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())

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")
    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()
 
sss = len(s) % 2
 
if sss == 1:
    print("No")
else:
    a = s[:int(len(s)/2)]
    if a*2 == s:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    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:
def main(n, s):
    if n % 2 == 0:
        half = int(n / 2)
        if s[:half] == s[half:]:
            return 'Yes'

    return 'No'


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

Submission status: Accepted

Solution code:
import sys
import math
def i():return int(sys.stdin.readline().replace("\n",""))
def i2():return map(int,sys.stdin.readline().replace("\n","").split())
def s():return str(sys.stdin.readline().replace("\n",""))
def l():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def lx():return list(map(lambda x:int(x)*-1,sys.stdin.readline().replace("\n","").split()))
def t():return tuple(map(int,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":pass
n = i()
s = l()
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 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:
n=int(input())
s=input()
m=n//2
l=n%2
t1=s[:m]
t2=s[m:n]


if l==0 and t1==t2:
    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:
import sys
import heapq, math
from itertools import zip_longest, permutations, combinations, combinations_with_replacement
from itertools import accumulate, dropwhile, takewhile, groupby
from functools import lru_cache
from copy import deepcopy

n = int(input())
S = input()

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

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

if n%2==1:
  print("No")
else:
  a = s[:int(n/2)]
  b = s[int(n/2):]
  if a==b:
    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 != 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()

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

Submission status: Accepted

Solution code:
n = int(input())
s = input()
ans = True
if n % 2 != 0:
  ans = False
else:
  k = n // 2
  t = s[k:k*2]
  if s[:k] != t:
    ans = False
    
if ans:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
x=int(input())
t=int(x/2)
y=str(input())
if x%2!=0:
  print("No")
  exit()
for i in range(t):
  if y[i]!=y[i+t]:
    print("No")
    exit()
print("Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
s=input()
m=N//2
count=0
if N%2==1:
  print('No')
  exit()

for i in range(m):
  if s[i]==s[i+m]:
    count+=1
    
if count==m:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
s=list(input())
t=[0]*int(n/2)
if n%2==0:
  for k in range(0,int(n/2)):
    t[k]=s[k]
  t=t*2
  if t==s:
    print("Yes")
  else:
    print("No")

else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

ret = "No"

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

center = int(N / 2)
if S[:center] == S[center:]:
    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()
S1 = S[:(N // 2)]
S2 = S[(N // 2):]
if N < 1 or (N % 2) == 1 or S1 != S2:
    print("No")
else:
    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:
import sys

n=int(input())
s=input()
count=0

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

Submission status: Accepted

Solution code:
N = int(input())
S = input()
if N <= 1 or (N % 2) == 1:
    print("No")
else:
    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()
ans = "No"

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

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

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 = list(input())
if len(S) % 2 != 0:
  print('No')
  exit()
for i in range(len(S)//2):
  if S[i] == S[len(S)//2+i]:
    continue
  else:
    print('No')
    exit()
print('Yes')

Submission status: Accepted

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

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')
      exit(0)
  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()
S_list = [i for i in S]

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

Submission status: Accepted

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

C = N // 2
D = N + 1
if S[0:C] == S[C:N]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n = int(input())
s = input()
if n % 2:
    print('No')
    exit()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
ls = list(map(str,input()))
a=[]
b=[]
if n % 2 != 0:
    print('No')
else:
    for i in range(int(n/2)):
        a.append(ls[i])
    for j in range(int(n/2),n):
        b.append(ls[j])
    c = "".join(a)
    d = "".join(b)
    if c == d:
        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: 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()

c = len(S)//2
fs = S[c:]
ls = S[:c]

if fs == ls:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    solver()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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==1:
  print("No")
else:
  N2=N//2
  for i in range(N2):
    if S[i]!=S[i+N2]:
      print("No")
      break
  else:
    print("Yes")

Submission status: Accepted

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

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

Submission status: Accepted

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

if n % 2 == 0 and s[0: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==0:
    s=S[:n//2]
    t=S[n//2:]
    if s==t:
        print("Yes")
        sys.exit()
print("No")

Submission status: Accepted

Solution code:
#145_B
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:
    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()
count = 0
if n % 2 == 0:
    for i in range(n//2):
        if s[i] != s[i+n//2]:
            count += 1
else:
    count +=1
if count == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n = input()
s= raw_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:
  print("No")
else:
  slen = len(s) // 2
  
  for i in range(slen):
    if s[i] != s[i + slen]:
      print("No")
      exit()
  print("Yes")

Submission status: Accepted

Solution code:
n = input()
s = raw_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 and s[:int(n/2)] == s[int(n/2):] :
  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()

half = n // 2

a = s[:half]
b = s[half:]

if a == b:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

x = int(N / 2)
y = S[0:x]
z = S[x:]

if N > 1 and y == z:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
# import bisect
# import heapq
# from copy import deepcopy
# from collections import deque
# from collections import Counter
# from itertools import accumulate
# from itertools import permutations
# import numpy as np
# import math
# mod = 10**9 + 7

# n = int(input())
# a = list(map(int, input().split()))
n = int(input())
s = input()

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

Submission status: Accepted

Solution code:
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, acos, atan, asin
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
def input(): return sys.stdin.readline().strip()
def STR(): return input()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
sys.setrecursionlimit(10 ** 9)
inf = sys.maxsize
mod = 10 ** 9 + 7

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()
input_nums = lambda: list(map(int, input().split()))

def main():
    N = int(input())
    S = input()
    if N % 2 != 0:
        print('No')
    else:
        if 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(N%2==0):
  num=N//2
  a=S[:num]
  b=S[num:]
  if(a==b):
    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:
	flag = 1
	for i in range(N//2):
		if S[i] != S[i+N//2]:
			flag = 0
	if flag == 0:
		print('No')
	else:
		print('Yes')