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:
#python3

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


main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
S = str(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:
import sys
n = int(input())
s = input()
if n % 2 ==0:
    if s[0:n//2] == s[n//2:n]:
        print("Yes")
        sys.exit()
print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# https://atcoder.jp/contests/abc145/tasks/abc145_b

n = int(input())
s = input()
if len(s) % 2 == 0:
    m = len(s) // 2
    if s[:m] == s[m:]:
        print("Yes")
        exit()
print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
S = input()
b = False
if n % 2 == 0:
  h = int(n/2)
  b =  True
  for i in range(h):
    if S[i] != S[i+h]:
      b = False
print("Yes" if b else "No")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys
import collections

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

d = collections.deque()
def LI(): return list(map(int, sys.stdin.readline().split()))

N = int(input())
S = str(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())
s=1

if len(S)%2==1:
    print("No")

else:
    for i in range (len(S)//2):
        if S[i]!=S[i+len(S)//2]:
            print("No")
            s=0
            break
    if s==1:
        print("Yes")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/python3

def main():
  n = int(input())
  s = input().strip()
  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:
n = int(input())
s = input()

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

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

Submission status: Accepted

Solution code:
n, s = int(input()), input()
print("YNeos"[(s[:n//2]*2 != s)::2])

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# #!/usr/bin/env python3
# # -*- coding: utf-8 -*-


def main():
    N = int(input())
    S = input()
    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 n%2!=0: print('No')
else:
  m = n//2
  if s[0:m]==s[m:n]: 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:
n = int(input())
s = input()

if n == 1:
    print("No")
    exit()
if n % 2 == 1:
    print("No")
    exit()
if n != 1:
    a = 0
for i in range(n//2):
    #print(s[i], s[(n//2)+i])
    if s[i] == s[(n//2)+i]:
        a += 1

if a == (n//2):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

if len(s) % 2 == 1:
    print("No")
elif 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 == 1:
  print("No")
else:
  print("Yes" if S[0:N//2] == S[N//2:N] else "No")

Submission status: Accepted

Solution code:
N=int(input())
S=input()
c=0
if N%2==1:
  print("No")
else:
  m=N//2
  for i in range(N//2):
    if S[i]==S[m+i]:
      c=c+1
      if c==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:
N = int(input())
S = input()

n = N//2

print("YNeos"[S != S[:n]*2::2])

Submission status: Accepted

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

word = ''

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
def echo(n, s):
    # nが奇数
    if  n % 2 != 0:
        return "No"
    # nが偶数
    else:
        s_first, s_last = s[:int(n/2)], s[int(n/2):]
        if s_first == s_last:
            return "Yes"
        else:
            return "No"

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

Submission status: Accepted

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

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()
T = ""
for i in range(len(S)//2):
    T += S[i]

print("Yes" if S == T+T else "No")

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

Submission status: Accepted

Solution code:
n = int(input())
s = list(input())
ans = "Yes"


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

Submission status: Accepted

Solution code:
n = int(input())

s = input()
s = list(s)

str1 = ''
str2 = ''

half = n/2 - 1

if n%2 == 0:
    for i in range(n):
        if i <= half:
            str1 += s[i]
        else:
            str2 += s[i] 
    if str1 == str2:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Submission status: Accepted

Solution code:
N=int(input())
S=input()
if S==S[0:N//2]+S[0:N//2]:
    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)
  if s[:mid] == s[mid:]:
    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()

m = n // 2

for i in range(m):
    if s[i] != s[m + i]:
        print("No")
        sys.exit()
print("Yes")

Submission status: Accepted

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

if N % 2 != 0:
    print("No")
else:
    charaHalf = S[:int(N / 2)]
    if charaHalf * 2 == S:
        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())
S = list(input())

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

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def IS(): return sys.stdin.readline()
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LII(rows_number): return [II() for _ in range(rows_number)]
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]

def main():
	N = II()
	S = IS()
	if(N % 2 != 0):
		print("No")
	else:
		if(S[:N//2] == S[N//2:-1]):
			print("Yes")
		else:
			print("No")

main()

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
S = input()

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

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

Submission status: Accepted

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

if n%2==0:
    mid=int(n/2)
    prv=s[0:mid];lat=s[mid:n]
    if prv==lat:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Accepted

Solution code:
n=int(input())
s=str(input())
ans='No'
if n%2==0:
    fs=s[:n//2]
    bs=s[n//2:]
    if fs==bs:
        ans='Yes'
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 = list(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 == 1:
    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 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())
A=list(input())
if N%2==1:
    print("No")
elif A[0:N//2]==A[N//2:N]:
    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()
f=0
if N%2==1:
    print('No')
else:
    for i in range(0,N//2):
        if S[i]!=S[i+N//2]:
            print('No')
            f=1
            break
    if f==0:
        print('Yes')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 7)

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
s = list(str(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==1:print("No")
else:
    b=True
    for x in range(int(n/2)):
        if s[x]!=s[x+int(n/2)]:b=False
    if b:print("Yes")
    else:print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

if n % 2 == 0:
    n_2 = n // 2
    for i in range(n_2):
        if s[i] == s[i+n_2]:
            continue
        else:
            print('No')
            sys.exit()
            
    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(0,n//2):
    if s[i]!=s[i+n//2]:
      print('No')
      break
    else:
      pass
    
    if i==n//2-1:
      print('Yes')

Submission status: Accepted

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

if len(S) % 2:
    print('No')
    exit()
flag = 0
for i in range(len(S)//2):
    if S[i] != S[i+len(S)//2]:
        flag = 1
if flag == 1:
    print('No')
else:
    print('Yes')

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
row = sys.stdin.readline


def read_int(row):
    return int(row().rstrip())

def read_string(row):
    return row().rstrip()

N = read_int(row)
S = read_string(row)

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

Submission status: Accepted

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

if n % 1:
    print('No')

s1 = s[:n // 2]
print('Yes' if s1+s1 == s 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")
    exit(0)

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

print("Yes")

Submission status: Accepted

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

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

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

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,s=int(input()),input()
ans="Yes"
if n%2 != 0:
  print("No")
  exit()
for a,b in zip(s[:int(n/2)], s[int(n/2):]):
  if a != b:
    ans="No"
    
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#145 b
n=int(input())
s=input()
ans="No"
if n%2!=1:
    x=int(n/2)
    if s[0:x]==s[x:]:
        ans="Yes"
print(ans)

Submission status: Accepted

Solution code:

n = int(input())
s = list(input())
a = int(n/2)

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

Submission status: Accepted

Solution code:
N = int(input())
S = input()
ans = 'No'

if N > 1 and N % 2 == 0:
  if S[int(N/2):] == S[:int(N/2)]:
    ans = 'Yes'

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:
# -*- coding utf-8 -*-

MOD = 10 ** 9 + 7

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

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

print(ans)

Submission status: Accepted

Solution code:
import sys

def propare():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    
    tokens = iterate_tokens()
    N = int(next(tokens))
    S = next(tokens)

    solve(N, S)

def solve(N: int, S: str):
    if N%2 == 0:
        half = int(N/2)
        s_first = S[:half]
        s_last = S[half:]
        if s_first == s_last:
            print('Yes')
        else:
            print('No')
    else: 
        print('No')

    return


 
if __name__ == "__main__":
    propare()

Submission status: Accepted

Solution code:
import sys
a=int(input())
b=list(input())
c=0
if a%2==1:
  print('No')
  sys.exit()
for i in range(a//2):
  if  b[i]==b[i+(a//2)]:
    c+=1
  else:
    pass
  if c>=a//2:
    break
  
if c==a//2:
  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:
x = int(input())
s = input()
if x%2 ==1 or s[:x//2] != s[x//2:]:
	print('No')
else:
	print('Yes')

Submission status: Accepted

Solution code:

n = int(input())
s = input()
a = ""
status = 0

if n % 2 == 0:
    if s == s[0:int(len(s)/2)] * 2:
        print("Yes")
        status = 1

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Fri Jan 24 18:15:07 2020
abc145b
@author: manakamura
"""
import sys

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

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

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

Submission status: Accepted

Solution code:
i=input()
S=input()
if S[:len(S)//2] != S[len(S)//2:] or len(S)%2 !=0:
  print("No")
else:
  print("Yes")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
S=input()
flag=1
for i in range(int(N/2)):
   if not(S[i]==S[i+int(N/2)]):
      flag=0
if (flag==1)and((N%2)==0):
   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) % 2 == 1:
    print('No')
else:
    if s[0:int(len(s)/2)] == s[int(len(s)/2):]:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


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

Submission status: Accepted

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

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