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:
def check(s,index):
    s1 = s[:index+1]
    s2 = s[index+1:]

    if s1 == s2:
        return True

    return False

def main():
    n = int(input())
    s = input()
    for i in range(len(s)):
        if check(s,i):
            print('Yes')
            return

    print('No')


main()

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

import sys
n =int(input())
s=input()

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


def main():
    N = int(input())
    S = input().strip()
    if len(S) % 2 != 0:
        print("No")
        return
    if S[:len(S)//2] == S[len(S)//2:]:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys, math
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
sys.setrecursionlimit(10**8)
inf = float('inf')
ans=count=0

n=int(input())
S=input()
if n%2!=0:
    print("No")
    exit()
n=n//2
if S[:n]==S[n:]:
    print("Yes")
else:
    print("No")
# print(S[:n],S[n:])

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

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())
L=input()
n=N//2
x=L[:n]
y=L[n:]
if x==y:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def two_int():
    N, K = map(int, input().split())
    return N,K

def one_int():
    return int(input())

def one_str():
    return input()

def many_int():
    return list(map(int, input().split()))

N=one_int()
S=one_str()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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:
def calc(N, S):
    s = S[:N // 2]
    return 'Yes' if s == S[N // 2:] else 'No'


N = int(input())
S = input()
print(calc(N, S))

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:
  if S[:n//2]==S[n//2:]:
    print('Yes')
    exit()
print('No')

Submission status: Accepted

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

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

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

Submission status: Accepted

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

if N % 2 == 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()
f=True
if N%2==1:
    f=False
else:
    m=N//2
    for i in range(m):
        if S[i]!=S[i+m]:
            f=False
print('Yes' if f else 'No')

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    N = int(inputs[0])
    S = inputs[1]
    half_1 = S[:N//2]
    half_2 = S[N//2:]
    if half_1 == half_2:
        return 'Yes'
    return 'No'


def string_to_int(string):
    return list(map(lambda x: int(x), string.split()))


if __name__ == "__main__":
    ret = solve(inputs(2))
    print(ret)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
# input = sys.stdin.readline

n = int(input())
s = input().rstrip()
front = s[:n//2]
back = s[n//2:]
if front == back:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:

N = int(input())

S = input()

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

#print (S[:N//2],S[N//2:])

elif S[:N//2] == S[N//2:]:
    print ("Yes")

else:
    print ("No")

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    s = input()
    if n % 2 == 1:
        return False
    
    i = n // 2
    if s[:i] == s[i:]:
        return True
    else:
        return False


if __name__ == "__main__":
    if main():
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

S = list(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 == 1:
    print('No')
    exit()
else:
    num = N // 2

T = S[:num]
# print(T)
if T + T == S:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
n=int(input())
s=list(input())
if n%2!=0:
  print('No')
  sys.exit()
a=s[0:n//2];b=s[(n//2):n]
if a==b:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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

def calc():
    if len(S) % 2 == 1:
        return 'No'
    
    left = S[len(S)//2:]
    right = S[:len(S)//2]
    if left == right:
        return 'Yes'
    else:
        return 'No'

print(calc())

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:
import sys
input = sys.stdin.readline
N = int(input())
S = list(input())[: -1]
if N % 2 == 0 and (S[: N // 2] == S[N // 2: ]):
  print("Yes")
else: print("No")

Submission status: Accepted

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

Submission status: Accepted

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


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin


def input():
    return stdin.readline()[:-1]


def intput():
    return int(input())


def sinput():
    return input().split()


def intsput():
    return map(int, sinput())


n = intput()

s = input()

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

Submission status: Accepted

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

sys.setrecursionlimit(10**7)
inf=10**20
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 [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  n=I()
  s=S()

  if n%2==1:
    return 'No'

  if s[:n//2]==s[n//2:]:
    return 'Yes'
  return 'No'

# main()
print(main())

Submission status: Accepted

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

Submission status: Accepted

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

    s1 = s[:n//2]
    s2 = s[n//2:]

    if s1 == s2:
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
from collections import defaultdict, Counter, deque
from itertools import accumulate, permutations, combinations
from operator import itemgetter
from bisect import bisect_left, bisect_right, bisect
from heapq import heappop, heappush
from fractions import gcd
from math import ceil, floor, sqrt, cos, sin, pi
from copy import deepcopy

# If you use recursive call, uncomment this code
#sys.setrecursionlimit(10**6)

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

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

if __name__ == '__main__':
    main()

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().strip()

T = S[:N//2]

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
n=int(input())
s=list(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:
#!/usr/bin/python3

import os
import sys


def main():
    N = read_int()
    S = inp()
    print('Yes' if N % 2 == 0 and S[N // 2:] == S[:N // 2] else 'No')


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

DEBUG = 'DEBUG' in os.environ


def inp():
    return sys.stdin.readline().rstrip()


def read_int():
    return int(inp())


def read_ints():
    return [int(e) for e in inp().split()]


def dprint(*value, sep=' ', end='\n'):
    if DEBUG:
        print(*value, sep=sep, end=end)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
from heapq import heapify, heappop, heappush
MAX_INT = int(10e15)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

N = I()
s = S()

if N%2 == 0:
  num = N//2
  if s[:num] == s[num:]:
    print("Yes")
    exit()
print("No")

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    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:
    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 == 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()
tmp = S[:(N // 2)]
if S == tmp + tmp:
    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 == 1:
    print('No')
    exit()
S1 = S[:N//2]
S2 = S[N//2:]
if S1 == S2:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
n=int(input())
s=input()
for i in range(n):
    if s[:i]==s[i:]:
        print("Yes")
        exit()
print("No")

Submission status: Accepted

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


def main():
  input()
  s = input().strip()
  prev = s[:len(s) // 2]
  post = s[len(s) // 2:]

  if prev == post:
    print('Yes')
  else:
    print('No')


if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
#%%
n = int(input())
s = list(input())
ans = 'Yes'
if n % 2 == 0:
    m = n //2
    for i in range(m):
        if s[i] == s[i+m]:
            pass
        else:
            ans = 'No'
else:
    ans = 'No'
print(ans)

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

def makelist(n, m):
    return [[0 for _ in range(m)] for _ in range(n)]

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

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

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

Submission status: Accepted

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

for i in range(N):
    if S[:i] == S[i:]:
        print('Yes')
        exit()
print('No')

Submission status: Accepted

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

print("Yes" if s[0: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:
n = int(input())
l = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():

    N = int(input())
    S = input()
    if N % 2 == 1: return "No"
    else:
        M = N // 2
        if S[:M] == S[M:]:
            return "Yes"
    return "No"

if __name__ == '__main__':
    print(main())

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

#ライブラリインポート
from collections import defaultdict

#入力受け取り
def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	N = int(input())
	S = input()
	if N % 2 != 0:
		print("No")
	else:
		M = N // 2
		judge = "Yes"
		for i in range(M):
			if S[i] != S[i + M]:
				judge = "No"
		print(judge)
	

if __name__ == '__main__':
	main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys; readline = sys.stdin.readline
from collections import deque

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

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 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:] 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 n % 2 == 1:
    print('No')
    exit()

t1 = s[:n//2]
t2 = s[n//2:]
if t1 == t2:
    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()

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

Submission status: Accepted

Solution code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor
from operator import mul
from functools import reduce
sys.setrecursionlimit(10 ** 9)



INF = 10 ** 20
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
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)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 10 ** 9 + 7


n = I()
s = S()
if n % 2 or s[:n // 2] != s[n // 2:]:
    print('No')
else:
    print ('Yes')

Submission status: Accepted

Solution code:
import queue
import math
"""
N = int(input())
#S = input()
# (N,M) = (int(i) for i in input().split(" "))
# A = [int(i) for i in input().split()]
A = []
for i in range(N):
	A.append(int(input()))

print(A)

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)

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:
def main():
    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')


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
mod = 10**9+7
Max = sys.maxsize
def l(): #intのlist
    return list(map(int,input().split()))
def m(): #複数文字
    return map(int,input().split())
def onem(): #Nとかの取得
    return int(input())
def s(x): #圧縮
    a = []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): #listをスペースごとに分ける
    return " ".join(map(str,x))
def max2(x): #他のときもどうように作成可能
    return max(map(max,x))
def In(x,a): #aがリスト(sorted)
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False
"""
def nibu(x,n,r):
    ll = 0
    rr = r
    while True:
        mid = (ll+rr)//2

    if rr == mid:
        return ll
    if (ここに評価入れる):
        rr = mid
    else:
        ll = mid+1
"""

n = onem()

a = list(input())

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

    if (flag):
        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] == s else "No")

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin

sys.setrecursionlimit(10 ** 7)

def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x) - 1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

n = ni()
s = ns()

if n % 2:
    ans = "No"

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

print(ans)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

if n%2==1:
    print("No")
else:
    han=n//2
    swit=0
    for i in range(han):
        if s[i]!=s[i+han]:
            swit=1
    if swit==1:
        print("No")
    else:
        print("Yes")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

N = int(input())
S = input()
ok = True
if N%2 == 1:
    ok = False
else:
    for i in range(N//2):
        if S[i] != S[i+N//2]:
            ok = False
if ok:
    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:
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()

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

Submission status: Accepted

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

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