Problem:


Score : 200 points

Problem Statement

Given are a positive integer N and a string S of length N consisting of lowercase English letters.

Determine whether the string is a concatenation of two copies of some string.
That is, determine whether there is a string T such that S = T + T.

Constraints

1 \leq N \leq 100

S consists of lowercase English letters.

|S| = N

Input

Input is given from Standard Input in the following format:

N
S

Output

If S is a concatenation of two copies of some string, print Yes; otherwise, print No.

Sample Input 1

6
abcabc

Sample Output 1

Yes

Let T =  abc, and S = T + T.

Sample Input 2

6
abcadc

Sample Output 2

No

Sample Input 3

1
z

Sample Output 3

No



Sample input:
6
abcabc


Sample output:
Yes

Submission status: Accepted

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

Submission status: Accepted

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

    if n % 2 == 1:
        return False

    half = n // 2
    return s[:half] == s[half:]


print('Yes' if solve() else '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 main():
    n=int(input())
    s=input()
    if n%2:
        print("No")
        exit()
    n//=2
    for c0,c1 in zip(s,s[n:]):
        if c0!=c1:
            print("No")
            exit()
    print("Yes")

main()

Submission status: Accepted

Solution code:
N, = (int(x) for x in input().split())
S = input()

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

Submission status: Accepted

Solution code:
from sys import stdin
import statistics
from math import factorial

n = int(stdin.readline().rstrip())
s = stdin.readline().rstrip()

mae = s[:n//2]
ato = s[n//2:]

if mae == ato:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
# ABC145b


def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**6)

    # map(int,input().split())
    n = int(input())
    s = input()[:-1]
    print('Yes' if s[:n//2] == s[n//2:] else 'No')


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline

ri = lambda: int(input())
rs = lambda: input().rstrip()
ril = lambda: list(map(int, input().split()))
rsl = lambda: input().rstrip().split()
ris = lambda n: [ri() for _ in range(n)]
rss = lambda n: [rs() for _ in range(n)]
rils = lambda n: [ril() for _ in range(n)]
rsls = lambda n: [rsl() for _ in range(n)]

n = ri()
s = rs()
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 = 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:
# coding: utf-8
N = int(input())
S = input()
if S[:N//2] == S[N//2:]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(1000000)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

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

Submission status: Accepted

Solution code:
from collections import Counter,defaultdict,deque
import sys
import bisect
import math
import itertools
import string
import queue
import copy
from heapq import heappop, heappush
input = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7

def inp(): # n=1
    return int(input())
def inpm(): # x=1,y=2
    return map(int,input().split())
def inpl(): # a=[1,2,3,4,5,...,n]
    return list(map(int, input().split()))
def inpls(): # a=['1','2','3',...,'n']
    return list(input().split())
def inplm(n): # x=[] 複数行
    return list(int(input()) for _ in range(n))
def inpll(n): # [[1,1,1,1],[2,2,2,2],[3,3,3,3]]
    return sorted([list(map(int, input().split())) for _ in range(n)])
def sortx(x,n,k):
    if k == 0:x.sort(key=lambda y:y[1,n])
    else:x.sort(reversed=True, key=lambda y:y[1,n])
def graph():
    n=inp()
    g=[[] for _ in range(n)]
    for i in range(n):
        a=inp()
        a-=1
        g[i].append(a)
        g[a].append(i)
    return n,g
def graphm():
    n,m=inpm()
    g=[[] for _ in range(n)]
    for _ in range(m):
        a,b,w=inpm()
        a-=1
        b-=1
        g[a].append((b,w))
        g[b].append((a,w))
    return n,m,g

def dijkstra(s,n,g): # sからの最短距離 頂点数n
    s -= 1
    que = []
    d = [10**15 for _ in range(n)]
    d[s] = 0
    heappush( que,(0,s) )
    while len(que)>0:
        p =  heappop(que)
        v = p[1]
        if d[v] < p[0]:
            continue
        for i in range(len(g[v])):
            edge = g[v][i]
            if d[edge[0]] > d[v] + edge[1]:
                d[edge[0]] = d[v] + edge[1]
                heappush( que,(d[edge[0]] , edge[0]) )
    return d

def main():
    n=inp()
    s=input()
    if n%2==1:
        print("No")
        return
    for i in range(n//2):
        if s[i]!=s[i+(n//2)]:
            print("No")
            return
    print("Yes")

      
      

if __name__ == "__main__":
    main()

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:
n,s=int(input()),input()
print('No' if n%2==1 else 'Yes' if s[:n//2]==s[n//2:] else '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)
    else:
        if S[:N//2] == S[N//2:]:
            print(YES)
        else:
            print(NO)
    return


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda :sys.stdin.readline().rstrip()
def resolve():
    n=int(input())
    if(n&1):
        print("No")
        return
    S=input()
    a=S[:n//2]
    b=S[n//2:]
    print("Yes" if(a==b) else "No")
resolve()

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

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

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

Submission status: Accepted

Solution code:
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools
sys.setrecursionlimit(10**8)
mod = 10**9+7
mod2 = 998244353
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

n = inp()
s = input()
if n%2:
    print('No')
else:
    for i in range(n//2):
        if s[i] == s[i+n//2]:
            continue
        print('No')
        break
    else:
        print('Yes')

Submission status: Accepted

Solution code:
# import sys
# input = sys.stdin.readline
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
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,log #log2ないｙｐ
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    N=I()
    S=ST()
    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==1:print("No")
else:
  if s[:n//2]*2==s:print("Yes")
  else:print("No")

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time,random

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


def main():
    n = I()
    s = S()
    if s[:n//2] == s[n//2:]:
        return 'Yes'

    return 'No'


print(main())

Submission status: Accepted

Solution code:
import sys
import math
from collections import defaultdict

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(input())
def II(): return map(int, input().split())
def III(): return list(map(int, input().split()))
def Line(N,num):
    if N<=0:
        return [[]]*num
    elif num==1:
        return [I() for _ in range(N)]
    else:
        read_all = [tuple(II()) for _ in range(N)]
        return map(list, zip(*read_all))

#################

N = I()
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:
#!usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    n = I()
    s = S()
    m = n>>1
    if s[:m] == s[m:]:
        print("Yes")
    else:
        print("No")
    return

#Solve
if __name__ == "__main__":
    solve()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import bisect
import heapq
import itertools
import math
import operator
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7
# MOD = 998244353


N = int(sys.stdin.readline())
S = sys.stdin.readline().rstrip()

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

if (N % 2 == 0):
  if (A[0:N/2-1] == A[N/2:N-1]):
    print("Yes")
  else:
    print("No")
else:
  print("No")

Submission status: Runtime Error

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

if (N % 2 == 0):
  if (A[:N/2-1] == A[N/2:]):
    print("Yes")
  else:
    print("No")
else:
  print("No")

Submission status: Runtime Error

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

if (N % 2 == 0):
  if (A[:N/2-1] == A[N/2:N-1]):
    print("Yes")
  else:
    print("No")
else:
  print("No")

Submission status: Runtime Error

Solution code:
n = int(input())
s = input()
if n % 2 == 1:
  print("No")

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

Submission status: Runtime Error

Solution code:
n = int(input())
s = input()
if n % 2 == 1:
  print("No")

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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: Runtime Error

Solution code:
N = int(input())
S = input()
if N % 2 > 0 or S != S[:int(N/2)] + S[:int(N/2)]:
    exit("No")
exit("Yes")

Submission status: Runtime Error

Solution code:
N = int(input())
S = input()
if N % 2 > 0 or S != S[:int(N/2)] + S[:int(N/2)6]:
    exit("No")
exit("Yes")

Submission status: Runtime Error

Solution code:
n = ont(input())
for i in range(2,n):
    if n % i == o:
        print("No")
        exit()
else:
    print("Yes")

Submission status: Runtime Error

Solution code:
#a,b,c = map(int,input().split())
a = int(input())
b = input()
c = s[:a//2]
d = s[a//2:a]
print("No" if c == d else "Yes")

Submission status: Runtime Error

Solution code:
#a,b,c = map(int,input().split())
a = int(input())
b = input()
c = s[:a//2]
d = s[a//2:a]
print("No" if c = d else "Yes")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

if n % 2 == 1:
  print('NO')
  exit()
  
half = n // 2  

if s[:half] == S [half:]:
  print('YES')
else:
  print('NO')

Submission status: Runtime Error

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

if n % 2 == 1:
  print('NO')
  exit()
  
half = n // 2  

if s[:half] == S [half:]:
  print('YES')
else:
  print('NO')

Submission status: Runtime Error

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


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

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

Submission status: Runtime Error

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

if n % 2 == 1:
  print('NO')
  exit()
else
	c = n // 2 
	a = s.[1:c]
	b = s.[c + 1:n]
    
if a == b:
	print('YES')
else
	print('NO')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

def solve(N, S):
  try:
      s = S[0:int(N/2)]
      if S = s + s
          return "Yes"
      else:
        return "No"
  except:
    return "No"
  
print(solve(N, S))

Submission status: Runtime Error

Solution code:
 = 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: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
s = input()
if n%2==1:
  print("NO") 
elif s[0:n/2] == s[n/2:-1]:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

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: Runtime Error

Solution code:
n = int(input())
s = input()
c = n/2
stt = s[:c]
end = s[c:]

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

if (stt == end):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
n = int(input())
s = input()
c = n/2
stt = s[: c]
end = s[c :]

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

if stt == end :
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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: Runtime Error

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: Runtime Error

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')
      break
      
  print('Yes')

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
t=input();
s=raw_input();
if t%2!=0:
  print "No"
else:
  if s[0:n/2]==s[n/2+1:n]:
    print "No"
  else:
    print "Yes"

Submission status: Runtime Error

Solution code:
lst = input()

lst[0] = int(lst[0])
n = lst[0]
s = lst[1]

if n % 2 == 1:
    print('NO')

t = ''

for i in range(0, n//2):
    t += s[i]

if t + t == s:
    print('YES')
else:
    print('NO')

Submission status: Runtime Error

Solution code:
lst = input().split()

lst[0] = int(lst[0])
n = lst[0]
s = lst[1]

if n % 2 == 1:
    print('NO')

t = ''

for i in range(0, n//2):
    t += s[i]

if t + t == s:
    print('YES')
else:
    print('NO')

Submission status: Runtime Error

Solution code:
lst = input().split()

lst[0] = int(lst[0])
n = lst[0]
s = lst[1]

if n % 2 == 1:
    print('NO')

t = ''

for i in range(0, n/2):
    t += s[i]

if t + t == s:
    print('YES')
else:
    print('NO')

Submission status: Runtime Error

Solution code:
lst = input().split()

n = lst[0]
n = int(n)
s = lst[1]

if n % 2 == 1:
    print('NO')

t = s[0, n/2 + 1]

if t + t == s:
    print('YES')
else:
    print('NO')

Submission status: Runtime Error

Solution code:
lst = (input().split())

n = lst[0]
n = int(n)
s = lst[1]

if n % 2 == 1:
    print('NO')

t = s[0, n/2 + 1]

if t + t == s:
    print('YES')
else:
    print('NO')

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=int(input())
S=input()
if all(a==b for a,v in zip(S,S[N:]):
       print("Yes")
else:
       print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=int(input())
S=input()
len_of_s=len(S)
if len_of_s%2==0 and S[:len_of_s/2+1]==s[len_of_s/2+1:]:
  print("Yes")
elif
  print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())

S = input()
# 仮にn=6の場合3より後と3までが一緒ならyes
if N % 2 == 0:
   if S[:int(N/2)] == S[int(N/2):]:
       print("Yes")
   else:
       print("No")
# 奇数ならそもそもno
else:
   print("No")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: Runtime Error

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

Submission status: Runtime Error

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: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
S = input()
print("Yes" if N%2 == 0 and S[:(N/2)+1] == S[(N/2)+1:N+1])

Submission status: Runtime Error

Solution code:
N = input()
S = input()
print("Yes" if N%2 == 0 and S[:(N/2)+1] == S[(N/2)+1:N+1])

Submission status: Runtime Error

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