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()
s1=''
s2=''
for i in range(0,int(n/2)):
    s1+=s[i]
for j in range(int(n/2),n):
    s2+=s[j]
if s1==s2:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

# check
if N < 2 or N % 2 != 0:
    print("No")
else:
    if N == 2:
        right = S[0]
        left = S[1]
    else:
        c = N // 2
        right = S[0:c]
        left = S[c:]

    if right == left:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

N = int(input().rstrip())
S = input().rstrip()

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

Submission status: Accepted

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

Submission status: Accepted

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

if n % 2 == 1:
    print("No")
else:
    l = len(a)//2
    v, k = a[:l], a[l:]
    if v == k:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

Submission status: Accepted

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

import sys
from collections import defaultdict, deque
from heapq import heappush, heappop
import math
import bisect

# 再起回数上限変更
# sys.setrecursionlimit(1000000)

N = int(input())
S = input()
num = len(S)
if num % 2 == 1:
    print('No')
    sys.exit()

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

Submission status: Accepted

Solution code:
n = int(input())
s = input()
mid = int(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):
  usiro = int(n/2)
  mae = int(n/2)
else:
  print("No")
  exit()

if(s[0:mae] == s[usiro:]):
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:

if __name__ == "__main__":
    N = int(input())
    S = input()
    N2 = int(N / 2)
    print( "Yes") if S[:N2] == S[N2:] else print( "No")

Submission status: Accepted

Solution code:
input()
s = input()
mid = len(s) // 2

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

Submission status: Accepted

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


if __name__ == "__main__":
    recta()

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:
import fileinput

n = int(input())

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

s = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if len(S) % 2 == 0:
  S1 = S[:N // 2]
  S2 = S[N // 2:]
  if S1 == S2:
    print('Yes')
    exit()
  else:
    print('No')
    exit()
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# B - Echo
def main():
    n = int(input())
    s = input()
    if n % 2 == 0:
        for i in range(n//2):
            if s[i] != s[i+n//2]:
                print('No')
                exit()
        else:
            print('Yes')
    else:
        print('No')
        exit()


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:

def main():
    _len = int(input())
    _str = input()

    if _len < 0 or _len > 100 or _len % 2 : 
        print("No")
        return
    idx = int(_len/2)
    a, b = _str[:idx], _str[idx:]

    print("Yes" if a == b else "No")


if __name__ == '__main__':
    main()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
r = int(input())
s = input()
 
i = int(r/2)
before = s[i:]
after = s[:i]
 
if before == after:
	print('Yes')
else:
  	print('No')

Submission status: Accepted

Solution code:
n = int(input())
s = input()
cnt = 0
if n % 2 == 0:
    for i in range(n//2):
        if s[i] == s[i + n // 2]:
            cnt += 1

if n % 2 == 1:
    print('No')
else:
    if cnt == n // 2:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    S = input()
    if (N % 2 == 1):
        print('No')
    else:
        mid = N // 2
        print('Yes' if (S[:mid] == S[mid:]) else 'No')
    return 0
    
if __name__ == '__main__':
    main()

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

Submission status: Accepted

Solution code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop
from itertools import permutations, accumulate, combinations, combinations_with_replacement
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right
from copy import deepcopy
from operator import itemgetter
from functools import reduce
#from fractions import gcd
#from math import gcd
import sys
def I(): return int(input())
def Is(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def TI(): return tuple(map(int, input().split()))
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()
def LS(): return list(input())
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(10**6)
MOD = 10**9+7
INF = float('inf')



n = I()
s = S()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
#%% for atcoder uniittest use
import sys
input= lambda: sys.stdin.readline().rstrip()
sys.setrecursionlimit(10**9)
def pin(type=int):return map(type,input().split())
def tupin(t=int):return tuple(pin(t))
def lispin(t=int):return list(pin(t))
#%%code
def resolve():
    N,=pin()
    S=input()
    if N%2!=0:print("No");return
    for i in range(N//2):
        if S[i]!=S[i+(N//2)]:
            print("No");return
    
    print("Yes")
#%%submit!
resolve()

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:
length = int(input())
s = input()

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

Submission status: Accepted

Solution code:
# B - Echo

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 6)
# input = sys.stdin.readline    ####
int1 = lambda x: int(x) - 1
def II(): return int(input())

def MI(): return map(int, input().split())
def MI1(): return map(int1, input().split())

def LI(): return list(map(int, input().split()))
def LI1(): return list(map(int1, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

def printlist(lst, k='\n'): return k.join(list(map(str, lst)))
INF = float('inf')

def solve():
    n = II()
    S = list(input())

    if n % 2 == 0:
        h = n // 2
        if S[:h] == S[h:]:
            print('Yes')
            return
    print('No')


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

S_right=[]
S_left=[]
for i in range(0,(N//2)):
    S_left.append(S[i])
for i in range((N//2),N):
    S_right.append(S[i])
    
S_left=("").join(S_left)
S_right=("").join(S_right)

print("Yes" if S_left==S_right 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:(n+1)]:
    print ("Yes")
  else:
    print("No")

Submission status: Accepted

Solution code:
import sys

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')
      sys.exit()

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

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    if n % 2 != 0:
        print('No')
        exit()
    s = [v for v in input()]
    t = n//2
    if s[0:t] == s[t:]:
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    main()

Submission status: Accepted

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

f = s[:half] 
l = s[half:n]

if f == l:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

head = s[0:(n/2)]
tail = s[(n/2):]

result = 'No'
if head == tail:
    result = 'Yes'

print(result)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
import sys
n=int(input())
s=list(input())
count=0
if len(s)==1:
    print("No")
    sys.exit()
else:
    for i in range(len(s)//2):
        if len(s)%2==0 and s[i]==s[i+len(s)//2]:
            count+=0
        else:
            print("No")
            sys.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)]
  if t * 2 == s:
    print("Yes")
  else:
    print("No");

Submission status: Accepted

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

mid = s[:n//2]
last = s[n//2:]

if mid == last:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
str_len = int(input())
input_str = str(input())
half = int(int(str_len)/2)
if(str_len % 2 == 0 and input_str[0:half] == input_str[half:str_len]):
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

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

else :
  half = int(N/2)

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

Submission status: Accepted

Solution code:
N=int(input())
S=input()
if N%2==1:
    print('No')
    exit()
V=int(N/2)
S1=S[0:V]
S2=S[V:N]
if S1==S2:
    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:
a=int(input())
b=input()
if b[0:a//2]==b[a//2:]:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
input()
s=input()
half=int(len(s)/2)
print("Yes" if s[:half]==s[half:] 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 = 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:
    print("No")
    quit()

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

Submission status: Accepted

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

Submission status: Accepted

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

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

S_pre = S[:int(N/2)]
S_aft = S[int(N/2):]

flg=0
for i in range(len(S_pre)):
    if S_pre[i] != S_aft[i]:
        flg+=1

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

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:
N = input()
S = input()

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


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

Submission status: Accepted

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

Submission status: Accepted

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

if n%2==0:
    a = n//2
    if s[:a]==s[a:]:
        flag = True
        

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

Submission status: Accepted

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


def judge(s):
    if len(s) % 2 == 1:
        print("No")
        return
    for i in range(0, len(s)//2):
        if(s[i] != s[len(s)//2 + i]):
            print("No")
            return
    print("Yes")
    return


judge(s)

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('Yes' if s[:n//2] == s[n//2:] 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=str(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:
	tmp=s[int(n*0.5):n]
	if s[0:int(n*0.5)]==tmp:
		print('Yes')
	else:
		print('No')
else:
	print('No')

Submission status: Accepted

Solution code:

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

else:
    print('No')

Submission status: Accepted

Solution code:
import sys, math
from pprint import pprint
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mod = 10**9 + 7

N = ri()
S = rs()

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

N = int(input())
S = input()
N_2 = int(N / 2)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

def main():
    N, S = map(str, open(0).read().split())
    N = int(N)
    if not N % 2 == 0:
        print('No')
    else:
        if (S[0:N//2] == S[-(-N//2):]):
            print('Yes')
        else:
            print('No')


main()

Submission status: Accepted

Solution code:
N=int(input())
S=input()
r,l=[],[]
for i in range(N):
    if i<N/2:
        l+=S[i]
    else:
        r+=S[i]
if l==r:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

if n % 2 == 1:
    print("No")
else:
    for i in range(round(n/2)):
        if li[i] == li[round(n/2) + i]:
            pass
        else:
            print("No")
            exit()
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

S = input()
s = S[0:n]

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

Submission status: Accepted

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

ans = "No"

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

Submission status: Accepted

Solution code:
N = int(input())
S = input()
letter = S[0:N//2]
if S == letter*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()
ans="Yes"
if N%2!=0:
    ans="No"

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:
    n //= 2
else:
    print("No")
    exit()
s2 = s[n:]
for i in range(n):
    if s[i] != s2[i]:
        print("No")
        exit()
print("Yes")

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')
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]*2 == s:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys

YES = "Yes"  # type: str
NO = "No"  # type: str


def solve(N: int, S: str):
    if N % 2 == 1:
        print(NO)
        return
    elif S[: N // 2] != S[N // 2:]:
        print(NO)
        return
    print(YES)
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    S = next(tokens)  # type: str
    solve(N, S)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
S = input()
T1 = []
T2 = []
if N%2 == 1:
  print("No")
else:
  for i in range(int(N/2)):
    T1.append(S[i])
  for i in range(int(N/2),N):
    T2.append(S[i])
  if T1 == T2:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

Solution code:
a = int(input())
s = input()
i=0
t = ""

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

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

Submission status: Accepted

Solution code:
import sys
n = int(sys.stdin.readline())
s = sys.stdin.readline().strip()
if not n % 2:
  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()
cnt = 0

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import os

def main():
	n = int(input())
	s = input()
	flag = True
	if n%2 != 0:
		flag = False
	else:
		n = n//2
		if s[n:] != s[:n]:
			flag = False
	if flag:
		print("Yes")
	else:
		print("No")

if __name__ == "__main__":
	main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

S_fommer = S[:math.floor(N/2)]
S_latter = S[math.ceil(N/2):]

if S_fommer == S_latter:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
I = [input() for i in range(2)]
sn = int(I[0])
ss = str(I[1])
if sn%2 == 1 :
    A = 'No' 
else:
    sl = int(sn/2) 
    # print(sl)
    if sl >= 2 : 
        H1 = ss[:sl]
        H2 = ss[sl:]
    #     print(H1)
    #     print(H2)
    elif sl == 1 :
        H1 = str(ss[0])
        H2 = str(ss[1])
    if  H1 == H2 :
        A = 'Yes'
    else:
        A = 'No'
print(A)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s = input()
l = n//2
f = True
if n%2 == 0:
    for i in range(l):
        if s[i] != s[i+l]:
            f = False

else:
    f = False

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

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

ans = 'Yes'

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

Submission status: Accepted

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

cnt = n//2
f = 0
if n%2 == 1:
    f = 1
else:
    for i in range(cnt):
        if S[i] == S[cnt+i]:
            pass
        else:
            f = 1
            break

if f == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def isEcho(N, S):
    if N % 2 != 0: # 偶数じゃなければ
        return False
    
    first_S = S[0:int(N / 2)]
    last_S = S[int(N / 2):N]
    if first_S == last_S:
        return True
    return False

N = int(input())
S = input()
isTrue = isEcho(N, S)
if isTrue:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
def isEcho(N, S):
    if N % 2 != 0: # 偶数じゃなければ
        return False
    
    first_S = S[0:int(N/2)]
    last_S = S[int(N/2):N]
    if first_S == last_S:
        return True
    return False

N = int(input())
S = input()
isTrue = isEcho(N=N, S=S)
if isTrue:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#--Echo

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

if(number % 2 != 0):
  print("No")
  exit()
else:
  pass

harf = int(N / 2)

if(S[0:harf] == S[harf:N]):
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
#--Echo

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

number = len(S)
harf = int(N / 2)

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