Problem:


Score : 200 points

Problem Statement

We will call a string that can be obtained by concatenating two equal strings an even string.
For example, xyzxyz and aaaaaa are even, while ababab and xyzxy are not.

You are given an even string S consisting of lowercase English letters.
Find the length of the longest even string that can be obtained by deleting one or more characters from the end of S.
It is guaranteed that such a non-empty string exists for a given input.

Constraints

2 \leq |S| \leq 200

S is an even string consisting of lowercase English letters.

There exists a non-empty even string that can be obtained by deleting one or more characters from the end of S.

Input

Input is given from Standard Input in the following format:

S

Output

Print the length of the longest even string that can be obtained.

Sample Input 1

abaababaab

Sample Output 1

6

abaababaab itself is even, but we need to delete at least one character.

abaababaa is not even.

abaababa is not even.

abaabab is not even.

abaaba is even. Thus, we should print its length, 6.

Sample Input 2

xxxx

Sample Output 2

2

xxx is not even.

xx is even.

Sample Input 3

abcabcabcabc

Sample Output 3

6

The longest even string that can be obtained is abcabc, whose length is 6.

Sample Input 4

akasakaakasakasakaakas

Sample Output 4

14

The longest even string that can be obtained is akasakaakasaka, whose length is 14.



Sample input:
abaababaab


Sample output:
6

Submission status: Wrong Answer

Solution code:
S = input()
for i in range(2, len(S), 2):
    split = int(len(S[:-i])/2)
    if S[:split] == S[split:-i]:
        print(len(S[:-i]))

Submission status: Wrong Answer

Solution code:
s=input()
n=len(s)
for i in range(2,n,2):
  h=(n-i)//2
  if s[:h]==s[h:n-i]:
    print(n-i)

Submission status: Wrong Answer

Solution code:
s = input()

length = 0
if len(s) % 2 == 0:
  length = len(s) // 2 - 1
else:
  length = len(s) // 2

top = -1

for i in range(length):
  flag = True
  for j in range(i):
    if s[i - j] != s[i + j + 1]:
      flag = False
  if flag :
    top = (i+1) * 2

print(top)

Submission status: Wrong Answer

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

ans = []

for i in range(len(s)):
  tmp = s[0:len(s)-(i+1)]
  #print(tmp)
  if tmp == tmp[::-1]:
    ans.append(len(tmp))
    
print(max(ans))

Submission status: Wrong Answer

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

ans = []

for i in range(len(s)):
  tmp = s[0:len(s)-(i+1)]
  if tmp == tmp[::-1] and len(tmp)%2 == 0:
    ans.append(len(tmp))
    
print(max(ans))

Submission status: Wrong Answer

Solution code:
S = input()
for i in range(1, len(S)):
  s = S[:-i]
  l = len(s) // 2
  if s[:l] == s[l:]:
    print(len(s))

Submission status: Wrong Answer

Solution code:
import sys
S = input()

for i in range(1, len(S)):
  s = S[:-i]
  l = len(s) // 2
  if s[:l] == s[l:]:
    print(len(s))

Submission status: Wrong Answer

Solution code:
s = input()
a = int(len(s) / 2)
for i in range(a):
  if s[i] != s[a + i]:
    a -= 1
b = int(len(s) / 2) - a
if len(s) % 2 != 0:
  b += 1
print(b)

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

s = input().strip()

if len(s) == 2:
    print('')
    sys.exit(0)

for i in range(1, len(s) // 2):
    split_index = (len(s) - i * 2) // 2
    if s[:split_index] == s[split_index:len(s) - i * 2]:
        print(len(s) - i * 2)

Submission status: Wrong Answer

Solution code:
S=list(input())

for i in range(len(S)):
    del S[-1]
    for j in range(len(S)):
        if S.count(S[j])%2!=0:
            break
    else:
        print(len(S))
        break
else:
  print(0)

Submission status: Wrong Answer

Solution code:
S=list(input())

for i in range(len(S)):
    del S[-1]
    for j in range(len(S)):
        if S.count(S[j])%2!=0:
            break
    else:
        print(len(S))
        break

Submission status: Wrong Answer

Solution code:
s = input()
for i in range(10):
    s = s[:-2]
    tnp = 0
    for j in range(len(s)//2):
        if (s[j]!=s[len(s)//2+j]):
            tnp += 1
    if (tnp==0):
        print(len(s))
        break

Submission status: Wrong Answer

Solution code:
s = input()
ans = 0
for i in range(len(s) // 2 - 1):
  if s[:i * 2] == s[:i] + s[:i]:
    ans = 2 * i
print(ans)

Submission status: Wrong Answer

Solution code:
s = input()
ans = 0
for i in range(1,len(s)-1):
  tmp = s[:-i]
  l_tmp = len(tmp)
  if l_tmp %2 == 1:
    continue
  else:
    if tmp[:l_tmp//2] == tmp[l_tmp//2:]:
      ans = l_tmp
print(ans)

Submission status: Wrong Answer

Solution code:
s = input()
ans = 0
for i in range(1,len(s)):
  tmp = s[:-i]
  l_tmp = len(tmp)
  if l_tmp %2 == 1:
    continue
  else:
    if tmp[:l_tmp//2] == tmp[l_tmp//2:]:
      ans = l_tmp
print(ans)

Submission status: Wrong Answer

Solution code:
N = str(input())
cnt = 0

while True:
    N = N[0:-1]
    cnt += 1
    if len(N) % 2 == 0:
        if N[0:int(len(N)/2)] == N[int(len(N)/2):]:
            break

print(cnt)

Submission status: Wrong Answer

Solution code:
s = input()
for i in range(1,len(s)-1):
    t = s[:-i]
    if t[len(t)//2:] == t[:len(t)//2]:
        print(len(t))

Submission status: Wrong Answer

Solution code:
S = input()

ls = len(S)

#while True:
for i in range(10):
    ls -= 1
    if ls % 2 == 1:
        continue
    leftS = S[0:ls//2]
    rightS = S[ls//2:ls]
    if leftS == rightS:
        print(ls)
        exit()

Submission status: Wrong Answer

Solution code:
S = str(input())
S = S[:-2]

for _ in range(len(S)//2-2):
  
  if S[:len(S)//2] == S[len(S)//2:]:
    print(len(S))
    break
  else:
    S = S[:-2]

Submission status: Wrong Answer

Solution code:
s = str(input())
kind = set(s)
judge =True

#print(kind)
for i in range(2, len(s), 2):
    line = s[:len(s)-i]
    #print(line)
    
    for j in kind:
        if line.count(j)%2 != 0:
            judge = False
    if judge:
        ans = len(line)
        break
    judge = True



print(ans)

Submission status: Wrong Answer

Solution code:
s = str(input())
kind = set(s)
judge =True

#print(kind)
for i in range(1, len(s)):
    line = s[:len(s)-i]
    #print(line)
    if len(line)%2 != 0:
        pass
    else:
        for j in kind:
            if line.count(j)%2 != 0:
                judge = False
        if judge:
            ans = len(line)
            break
    judge = True
print(ans)

Submission status: Wrong Answer

Solution code:
S: str = input()

for i in range(len(S)//2):
    if len(S[:-i]) % 2 != 0:
        continue

    pivot: int = (len(S)-i) // 2
    if S[:pivot] == S[pivot:-i]:
        print(pivot * 2)
        break

Submission status: Wrong Answer

Solution code:
S = input()

for i in range(1, len(S)):
    gumozi = S[0:len(S)-i]

    if gumozi[0:len(gumozi)//2] == gumozi[(len(gumozi)//2):len(gumozi)]:
        print(len(gumozi))

Submission status: Wrong Answer

Solution code:
n = input()
num = len(n)-2
for i in range(num,0,2):
  f = int(i/2)
  if s[:f]==s[f:i]:
    print(i)
    break

Submission status: Wrong Answer

Solution code:
S=input()
S2=S[:(len(S))//2]
while len(S)>=2:
    S=S[:-2]
    S2=S2[:-1]
    if S==S2+S2:
        print(len(S),S,S2)
        exit()

Submission status: Wrong Answer

Solution code:
S=input()
S2=S[:(len(S))//2]
while len(S)>=2:
    S=S[:-2]
    S2=S2[:-1]
    if S==S2+S2:
        print(len(S),S,S2)

Submission status: Wrong Answer

Solution code:
S=input()
S2=S[:(len(S))//2]
while len(S)>=4:
    S=S[:-2]
    S2=S2[:-1]
    if S==S2+S2:
        print(len(S))

Submission status: Wrong Answer

Solution code:
S = input()

for i in range(1,len(S)):
  S2 = S[0:len(S)-i]
  flag = True
  if S2.count('a') %2 == 1:
    flag = False
  elif S2.count('b') %2 == 1:
    flag = False
  elif S2.count('c') %2 == 1:
  	flag = False
  elif S2.count('d') %2 == 1:
  	flag = False
  elif S2.count('e') %2 == 1:
  	flag = False
  elif S2.count('f') %2 == 1:
  	flag = False
  elif S2.count('g') %2 == 1:
  	flag = False
  elif S2.count('h') %2 == 1:
  	flag = False
  elif S2.count('i') %2 == 1:
  	flag = False
  elif S2.count('j') %2 == 1:
  	flag = False
  elif S2.count('k') %2 == 1:
  	flag = False
  elif S2.count('l') %2 == 1:
  	flag = False
  elif S2.count('m') %2 == 1:
  	flag = False
  elif S2.count('n') %2 == 1:
  	flag = False
  elif S2.count('o') %2 == 1:
  	flag = False
  elif S2.count('p') %2 == 1:
  	flag = False
  elif S2.count('q') %2 == 1:
  	flag = False
  elif S2.count('r') %2 == 1:
  	flag = False
  elif S2.count('s') %2 == 1:
  	flag = False
  elif S2.count('t') %2 == 1:
  	flag = False
  elif S2.count('u') %2 == 1:
  	flag = False
  elif S2.count('v') %2 == 1:
  	flag = False
  elif S2.count('w') %2 == 1:
  	flag = False
  elif S2.count('x') %2 == 1:
  	flag = False
  elif S2.count('y') %2 == 1:
    flag = False
  elif S2.count('z') %2 == 1:
    flag = False
  
  if flag:
    print(len(S2))
    break

Submission status: Wrong Answer

Solution code:
S = input()


for i in range(1,len(S)):
  S2 = S[0:len(S)-i]
  flag = True
  if S2.count('a') %2 == 1:
    flag = False
  elif S2.count('b') %2 == 1:
    flag = False
  elif S2.count('b') %2 == 1:
    flag = False
  elif S2.count('c') %2 == 1:
  	flag = False
  elif S2.count('d') %2 == 1:
  	flag = False
  elif S2.count('e') %2 == 1:
  	flag = False
  elif S2.count('f') %2 == 1:
  	flag = False
  elif S2.count('g') %2 == 1:
  	flag = False
  elif S2.count('h') %2 == 1:
  	flag = False
  elif S2.count('i') %2 == 1:
  	flag = False
  elif S2.count('j') %2 == 1:
  	flag = False
  elif S2.count('k') %2 == 1:
  	flag = False
  elif S2.count('l') %2 == 1:
  	flag = False
  elif S2.count('m') %2 == 1:
  	flag = False
  elif S2.count('n') %2 == 1:
  	flag = False
  elif S2.count('o') %2 == 1:
  	flag = False
  elif S2.count('p') %2 == 1:
  	flag = False
  elif S2.count('q') %2 == 1:
  	flag = False
  elif S2.count('r') %2 == 1:
  	flag = False
  elif S2.count('s') %2 == 1:
  	flag = False
  elif S2.count('t') %2 == 1:
  	flag = False
  elif S2.count('u') %2 == 1:
  	flag = False
  elif S2.count('v') %2 == 1:
  	flag = False
  elif S2.count('w') %2 == 1:
  	flag = False
  elif S2.count('x') %2 == 1:
  	flag = False
  elif S2.count('y') %2 == 1:
    flag = False
  elif S2.count('z') %2 == 1:
    flag = False
  
  if flag:
    print(len(S2))
    break

Submission status: Wrong Answer

Solution code:
s = str(input())
s1 = ""
s2 = ""
flag = 0

for i in range(len(s)):
	if not 0 == i:
		if i % 2 == 0:
			# print("---i--- {0}".format(i))
			s1 = s[0:int((len(s)-i)/2)]
			s2 = s[int((len(s)-i)/2):len(s)-i]
			# print(len(s)-i)
			# print("{0} --s1 \n {1} --s2".format(s1,s2))
			if s1 == s2:
				flag = len(s)-i

print(flag)

Submission status: Wrong Answer

Solution code:
s = str(input())
s1 = ""
s2 = ""
flag = 0

for i in range(len(s)):
	if not 0 == i and  not len(s) == i:
		if i % 2 == 0:
			# print("---i--- {0}".format(i))
			s1 = s[0:int((len(s)-i)/2)]
			s2 = s[int((len(s)-i)/2):len(s)-i]
			# print(len(s)-i)
			# print("{0} --s1 \n {1} --s2".format(s1,s2))
			if s1 == s2:
				flag = len(s)-i

print(flag)

Submission status: Wrong Answer

Solution code:
s = str(input())
s1 = ""
s2 = ""
flag = 0

for i in range(len(s)):
	if not 0 == i and  not len(s) == i:
		if i % 2 == 0:
			# print("---i--- {0}".format(i))
			s1 = s[0:int((len(s)-i)/2)]
			s2 = s[int((len(s)-i)/2):len(s)-i]
			# print(len(s)-i)
			# print("{0} --s1 \n {1} --s2".format(s1,s2))
			if s1 == s2:
				flag =  len(s1+s2)

print(flag)

Submission status: Wrong Answer

Solution code:
from collections import Counter
s=input()[::-1]
for i in range(1,len(s)):
  if all([True if i%2==0 else False for i in Counter(s[i:]).values()]):
    print(len(s[i:]))
    break
else:
  print(2)

Submission status: Wrong Answer

Solution code:
from collections import Counter
s=input()[::-1]
for i in range(1,len(s)):
  if all([True if i%2==0 else False for i in Counter(s[i:]).values()]):
    print(len(s[i:]))
    break

Submission status: Wrong Answer

Solution code:
from collections import Counter
s=input()[::-1]
for i in range(1,len(s)):
  if all([1 if i%2==0 else 0 for i in Counter(s[i:]).values()]):
    print(len(s[i:]))
    break

Submission status: Wrong Answer

Solution code:
s = input()
D = {}
for c in s:
    if c in D.keys():
        D[c] += 1
    else:
        D[c] = 1
for i in range(1,len(s)+1):
    D[s[len(s)-i]] -= 1
    for k in D.values():
        if k & 1:
            break
    else:
        ans = len(s)-i
        break  
print(ans)

Submission status: Wrong Answer

Solution code:
s = input()
D = {}
for c in s:
    if c in D.keys():
        D[c] += 1
    else:
        D[c] = 1
for i in range(1,len(s)+1):
    D[s[len(s)-i]] -= 1
    for k in D.values():
        if k % 1:
            break
    else:
        ans = len(s)-i
        break  
print(ans)

Submission status: Wrong Answer

Solution code:
s = input()
D = {}
for c in s:
    if c in D.keys():
        D[c] += 1
    else:
        D[c] = 1
for i in range(len(s)+1):
    for k in D.values():
        if k % 1:
            break
    else:
        ans = len(s)-i
        break
    D[s[len(s)-1-i]] -= 1
print(ans)

Submission status: Wrong Answer

Solution code:
s = list(input())
s.pop(-1)
while len(s) > 0:
  if len(s) % 2 == 1:
    s.pop(-1)
    continue
  n = len(s)//2
  a = "".join(s[:n])
  b = "".join(s[n:])
  if a == b:
    print(len(s))
  s.pop(-1)

Submission status: Wrong Answer

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

def ss(string):
    if len(string)&2==1:
        retrun(False)
    else:
        for i in range(len(string)//2):
            if S[i]!=S[len(string)-1-i]:
                return(False)
        return(True)

while True:
    if ss(S):
        print(len(S))
        exit()
    else:
        del S[-1]
        del S[-1]

Submission status: Wrong Answer

Solution code:
S=input()[:-1]

def is_even(seq):
  return seq[:len(seq)//2]==seq[len(seq)//2:]

for i in range(len(S)):
  s = S[:len(S)-i]
  if len(s)%2==0 and is_even(s):
    print(len(s))

Submission status: Wrong Answer

Solution code:
def isEvenStr(s):
  if len(s) % 2 == 1:
    return False
  elif s[0:int(len(s)/2)] == s[int(len(s)/2):]:
    return True
  else:
    return False

s = input()
i = 0
while not isEvenStr(s):
  s = s[:-1]
  i += 1
  if isEvenStr(s):
    print(i)

Submission status: Wrong Answer

Solution code:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np
from functools import reduce

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

s = rr()
lens = len(s)
for i in range(2, lens, 2):
  if s[:(lens - i) // 2] == s[(lens - i) // 2:lens - i]:
    print(s[:(lens - i) // 2])
    exit()

Submission status: Wrong Answer

Solution code:
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))
#l = [list(map(int,input().split())) for i in range(n)]
#a = [list(input()) for _ in range(n)]
#a = [int(input()) for _ in range(n)]

s = input()

for i in range(len(s)-1):
    s = s[:-1]
    if (len(s)%2 != 0):
        pass
    else:
        #print(s[0:len(s)//2])
        #print(s[len(s)//2:])
        if s[0:len(s)//2] == s[len(s)//2:]:
            print(len(s))

Submission status: Wrong Answer

Solution code:
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))
#l = [list(map(int,input().split())) for i in range(n)]
#a = [list(input()) for _ in range(n)]
#a = [int(input()) for _ in range(n)]

s = input()

for i in range(len(s)-1):
    s = s[:-1]
    if (i%2==0):
        pass
    else:
        #print(s)
        if s[0:len(s)//2] == s[len(s)//2:]:
            print(len(s))

Submission status: Wrong Answer

Solution code:
import sys
def input(): return sys.stdin.readline().strip()


def main():
    s = input()
    l = len(s)
    ans = l
    for i in range(l):
        if i % 2 != 0: continue
        ns = s[:l-i]
        even = True
        for j, c in enumerate(ns):
            if j >= (l - i) // 2: break
            if c != ns[(l - i) // 2 + j]:
                even = False
                break
        if even:
            ans = l - i
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import sys
def input(): return sys.stdin.readline().strip()


def main():
    s = input()
    l = len(s)
    ans = l
    for i in range(l):
        if i % 2 != 0: continue
        ns = s[:l-i]
        even = True
        for j, c in enumerate(ns):
            if c != ns[l-i-j-1]:
                even = False
                break
        if even:
            ans = l - i
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
'''     ░░█ ▄▀█ █   █▀ █░█ █▀█ █▀▀ █▀▀   █▀█ ▄▀█ █▀▄▀█  
        █▄█ █▀█ █   ▄█ █▀█ █▀▄ ██▄ ██▄   █▀▄ █▀█ █░▀░█     '''


# [temp1.py] => [29-07-2020 @ 10:25:10] 
# Author & Template by : Udit "luctivud" Gupta
# https://www.linkedin.com/in/udit-gupta-1b7863135/


import math;   from collections import *
import sys;    from functools import reduce
import time;   from itertools import groupby

# sys.setrecursionlimit(10**6)

def input()         : return sys.stdin.readline()
def get_ints()      : return map(int, input().strip().split())
def get_list()      : return list(get_ints())
def get_string()    : return list(input().strip().split())
def printxsp(*args) : return print(*args, end="")
def printsp(*args)  : return print(*args, end=" ")


DIRECTIONS = [(+0, +1), (+0, -1), (+1, +0), (+1, -1)] 
NEIGHBOURS = [(-1, -1), (-1, +0), (-1, +1), (+0, -1),\
              (+1, +1), (+1, +0), (+1, -1), (+0, +1)]


CAPS_ALPHABETS = {chr(i+ord('A')) : i for i in range(26)}
SMOL_ALPHABETS = {chr(i+ord('a')) : i for i in range(26)}
INF = float('inf')


# Custom input output is now piped through terminal commands.
# for _test_ in range(int(input())): 
s = input()
n = len(s)
ans = 1
while True:
	# if (n-ans < 0) break
	if ((n - ans) & 1):
		ans += 1;
	else:
		pos = (n-ans)//2
		if s[:pos] == s[pos:n-ans]:
			break
		else:
			ans += 1
printxsp(n - ans)



# print("Time Elapsed: {}".format(float(S34p-S34t)))

Submission status: Wrong Answer

Solution code:
'''     ░░█ ▄▀█ █   █▀ █░█ █▀█ █▀▀ █▀▀   █▀█ ▄▀█ █▀▄▀█  
        █▄█ █▀█ █   ▄█ █▀█ █▀▄ ██▄ ██▄   █▀▄ █▀█ █░▀░█     '''


# [temp1.py] => [29-07-2020 @ 10:25:10] 
# Author & Template by : Udit "luctivud" Gupta
# https://www.linkedin.com/in/udit-gupta-1b7863135/


import math;   from collections import *
import sys;    from functools import reduce
import time;   from itertools import groupby

# sys.setrecursionlimit(10**6)

def input()         : return sys.stdin.readline()
def get_ints()      : return map(int, input().strip().split())
def get_list()      : return list(get_ints())
def get_string()    : return list(input().strip().split())
def printxsp(*args) : return print(*args, end="")
def printsp(*args)  : return print(*args, end=" ")


DIRECTIONS = [(+0, +1), (+0, -1), (+1, +0), (+1, -1)] 
NEIGHBOURS = [(-1, -1), (-1, +0), (-1, +1), (+0, -1),\
              (+1, +1), (+1, +0), (+1, -1), (+0, +1)]


CAPS_ALPHABETS = {chr(i+ord('A')) : i for i in range(26)}
SMOL_ALPHABETS = {chr(i+ord('a')) : i for i in range(26)}
INF = float('inf')


# Custom input output is now piped through terminal commands.
# for _test_ in range(int(input())): 
s = input()
n = len(s)
ans = 1
while True:
	if ((n - ans) & 1):
		ans += 1;
	else:
		pos = (n-ans)//2
		if s[:pos] == s[pos:n-ans]:
			break
		else:
			ans += 1
print(n - ans)



# print("Time Elapsed: {}".format(float(S34p-S34t)))

Submission status: Wrong Answer

Solution code:
s = list(input())
s = s[:-1]

while len(s)%2!=0 or s[:len(s)//2]!=s[len(s)//2:][::-1]:
    s = s[:-1]
print(len(s))

Submission status: Wrong Answer

Solution code:
s = input()
while s[:len(s)//2] != s[len(s):]:
  s = s[:-2]
print(len(s))

Submission status: Wrong Answer

Solution code:
S = input()
for i in range(2, len(S), 2):
    if S[:(len(S)-i)//2] == S[(len(S)-i)//2:len(S)-i]:
        print(len(S)-i)

Submission status: Wrong Answer

Solution code:
S = input()[:-2]
while len(S) > 0:
    if S[:len(S) // 2] == S[len(S) // 2:]:
        print(len(S))
    S = S[:-2]

Submission status: Wrong Answer

Solution code:
s = input()

n = -1
if len(s) % 2 == 0:
    n = -2
while len(s) > abs(n):
    hanbun = len(s[:n])//2
    if s[:hanbun] == s[hanbun:n]:
        print(len(s[:n]))
    n -= 2

Submission status: Wrong Answer

Solution code:
s = input()

n = -2
while len(s) > abs(n):
    if s[:(len(s[:n])//2)] == s[(len(s[:n])//2):n]:
        print(len(s[:n]))
    n -= 2

Submission status: Wrong Answer

Solution code:
s = input()

n = -1
while len(s) > abs(n):
    if s[:(len(s[:n])//2)] == s[(len(s[:n])//2):n]:
        print(len(s[:(len(s[:n])//2)])*2)
    n -= 1

Submission status: Wrong Answer

Solution code:
s = input()

n = -2
while len(s) > abs(n):
    if s[:(len(s[:n])//2)] == s[(len(s[:n])//2):n]:
        print(len(s[:(len(s[:n])//2)])*2)
    n -= 2

Submission status: Wrong Answer

Solution code:
s = input()

n = -1
if len(s) % 2 == 0:
    n = -2

while len(s) > abs(n):
    if s[:(len(s[:n])//2)] == s[(len(s[:n])//2):n]:
        print(len(s[:(len(s[:n])//2)])*2)
    n -= 2

Submission status: Wrong Answer

Solution code:
s = input()
lens = len(s)
for i in range(2 if lens % 2 == 0 else 1, lens, 2):
    s = s[:-i]
    mid = len(s) // 2
    if s[:mid] == s[mid:]:
        print(len(s))
        break

Submission status: Wrong Answer

Solution code:
s = input()

ans = ""
start = 2 if len(s) % 2 == 0 else 1

for i in range(start, len(s), 2):
    t = s[:-i]
    mid = len(t) // 2
    if t[:mid] == t[mid:]:
        ans = t
else:
    print(len(ans))

Submission status: Wrong Answer

Solution code:
S = str(input())

while len(S) > 2:
  S = S[:-1]
  if len(S)%2 == 0:
    half = int(len(S)/2)
    if S[:half] == S[half:]:
      print(len(S))

Submission status: Wrong Answer

Solution code:
s = str(input())
s = s[:-1]
count = 0
while len(s)>1 and (s[0] != s[-1] or s[0] == s[-1]):
    if s[0] != s[-1]:
        s = s[:-1]
    elif s[0] == s[-1]:
        s = s[1:-1]
        count += 2
    
print(count)

Submission status: Wrong Answer

Solution code:
from collections import Counter
S = input()[:-1:]
S_cnt = Counter(S)
all_even = all(elem % 2 == 0 for elem in S_cnt.values())
while not all_even:
    S = S[:-1]
    S_cnt = Counter(S)
    all_even = all(elem % 2 == 0 for elem in S_cnt.values())
print(sum(S_cnt.values()))

Submission status: Wrong Answer

Solution code:
#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations,permutations,accumulate # (string,3) 3回
#from collections import deque
from collections import deque,defaultdict,Counter
import decimal
import re
#import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
#mod = 9982443453
def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
S = input()
dic = Counter(S)
lnS = len(S)
for i in range(lnS-1,-1,-1):
    #print(S)
    dic[S[i]] -= 1
    S = S[:i]
    flag = True
    for k,v in dic.items():
        if v%2:
            flag = False
            break
    if flag:
        print(len(S))
        exit()

Submission status: Wrong Answer

Solution code:
from collections import Counter
S = input()[:-1:]
S_cnt = Counter(S)
all_even = all(elem % 2 == 0 for elem in S_cnt.values())
now = len(S) - 1
while not all_even:
    S_cnt[S[now]] -= 1
    now -= 1
    all_even = all(elem % 2 == 0 for elem in S_cnt.values())
print(sum(S_cnt.values()))

Submission status: Wrong Answer

Solution code:
s=input()
for i in range(int(len(s)/2)):
    tmp=s[:-int((i+1)*2)]
    a=0
    for j in range(int(len(tmp)/2)):
        if tmp[j]==tmp[-j-1]:
            a+=1
    if a==int(len(tmp)/2):
        print(len(tmp))
        exit()

Submission status: Wrong Answer

Solution code:
s = open(0).readlines()[0]

if len(s)%2:
    s = s[:-1]
else:
    s = s[:-2]

while s[:len(s)//2] != s[len(s)//2:]:
    s = s[:-2]

print(len(s))

Submission status: Wrong Answer

Solution code:
s = open(0).read()

if len(s)%2:
    s = s[:-1]
else:
    s = s[:-2]

while s[:len(s)//2] != s[len(s)//2:]:
    s = s[:-2]

print(len(s))

Submission status: Wrong Answer

Solution code:
S = input()
l = (len(S) - 2)

for i in range(l, -1, -2):
    for j in range(len(S[0:i])):
        if S[0:i].count(S[j]) % 2 != 0:
            break
        else:
            if i == j + 1:
                print(len(S[0:i]))
                exit()

print(0)

Submission status: Wrong Answer

Solution code:
S = input()
l = (len(S) - 2)

for i in range(l, -1, -2):
    for j in range(len(S[0:i])):
        if S[0:i].count(S[j]) % 2 != 0:
            break
        else:
            if i == j + 1:
                print(len(S[0:i]))

Submission status: Wrong Answer

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

S = list(str(input()))

while len(S) > 1:
    S.pop()
    if S[0 : len(S) // 2] == S[len(S) // 2 :] and len(S) % 2 == 0:
        print(len(S))

Submission status: Wrong Answer

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

S = list(str(input()))

while len(S) > 1:
    S.pop()
    if S[0 : len(S) // 2] == S[len(S) // 2 :]:
        print(len(S))

Submission status: Wrong Answer

Solution code:
def main():
    s = list(input())
    if len(s) % 2 == 0:
        del s[-2:]
    else:
        del s[-1]
    
    half_len = len(s) // 2

    for i in range(0, half_len, 2):
        if s[:half_len-(i//2)] == s[half_len-(i//2):]:
            break
        else:
            del s[-2:]

    print(len(s))

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
    s = list(input())
    if len(s) % 2 == 0:
        del s[-1]

    del s[-1]
    half_len = len(s) // 2

    for i in range(0, half_len, 2):
        if s[:half_len-(i//2)] == s[half_len-(i//2):]:
            break
        else:
            del s[-2:]

    print(len(s))

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
s=input()
for i in range(len(s)//2):
  t=s[:-2*i]
  half=len(t)//2
  if t[:half]==t[half:]:
    ans=len(t)
    break
print(ans)

Submission status: Wrong Answer

Solution code:
s=input()
for i in range(len(s)//2):
  t=s[:-2*i]
  half=len(t)//2
  if t[:half]==t[half:]:
    ans=len(t)
print(ans)

Submission status: Wrong Answer

Solution code:
A= list(input())
while True:
    A.pop()
    A.pop()
    B=len(A)//2
    if A[:B+1]==A[B+1:]:
        print(len(A))
        break

Submission status: Wrong Answer

Solution code:
A= [i for i in input()]
while True:
    A.pop()
    A.pop()
    B=len(A)//2
    if A[:B+1]==A[B+1:]:
        print(len(A))
        break

Submission status: Wrong Answer

Solution code:
A= [i for i in input()]
while True:
    A.pop()
    A.pop()
    B=len(A)//2
    if A[:B]==A[B+1:]:
        print(len(A))
        break

Submission status: Wrong Answer

Solution code:
import sys
S = str(input())

if len(S) < 2 or len(S) > 200:
    sys.exit()
if not S.islower():
    sys.exit()

result = 0
for I in range(len(S)):
    length = len(S) - I
    if (not I == 0) and length % 2 == 0 and S[0:int(length / 2)] == S[int(length / 2):length]:
        result = length

if not result == 0:
    print(result)
else:
    sys.exit()

Submission status: Wrong Answer

Solution code:
import sys
S = str(input())

if len(S) < 2 or len(S) > 200:
    sys.exit()
if not S.islower():
    sys.exit()

for I in range(len(S)):
    length = len(S) - I
    if (not I == 0)and length % 2 == 0 and S[0:int(length / 2)] == S[int(length / 2):length]:
        print(length)

Submission status: Wrong Answer

Solution code:
s=list(input())
from copy import copy
t=s.copy()

for i in range(len(t)):
  if len(s)%2==0 and s[:len(s)%2]==s[len(s)%2:]:
    print(len(s))
    exit()
  else:
    s.pop(-1)

Submission status: Wrong Answer

Solution code:
s=list(input())
from copy import copy
t=s.copy()

for i in range(len(t)):
  if len(s)%2==0 and s[:len(s)%2]==s[len(s)%2:]:
    print(len(s)%2)
    exit()
  else:
    s.pop(-1)

Submission status: Wrong Answer

Solution code:
s=list(input())
from copy import copy
t=s.copy()

for i in range(1,len(t)+1):
  if len(s)%2==0 and s[:len(s)%2]==s[len(s)%2+1:]:
    print(len(s)%2)
    exit()
  else:
    s.remove(s[-1])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=input()
s=s[:1]
while True:
  if len(s)%2==0 and s[len(s)//2:]==s[:len(s)//2]:
    print(len(s))
    break
  else:
    s=s[:-1]
    continue

Submission status: Wrong Answer

Solution code:
s=input()
while True:
  if len(s)%2==0 and s[len(s)//2:]==s[:len(s)//2]:
    print(len(s))
    break
  else:
    s=s[:-1]
    continue

Submission status: Wrong Answer

Solution code:
s=list(input())
for i in range(0,len(s)//2):
    s=s[:-2]
    sa=s[:len(s)//2]
    sb=s[len(s)//2:]
    if sa==sb:
        print(len(s))

Submission status: Wrong Answer

Solution code:
s=list(input())
for i in range(1,len(s)//2):
    s=s[:-2]
    sa=s[:len(s)//2]
    sb=s[len(s)//2:]
    if sa==sb:
        print(len(s))

Submission status: Wrong Answer

Solution code:
import sys
S=input()
for i in range(1,len(S)):
  S=S[:-1]
  if len(S)%2==0:
    c=len(S)
    print(S[c//2+1:])
    print(S[:c//2])
    if S[:c//2]==S[c//2+1:]:
      print(i)
      sys.exit()

Submission status: Wrong Answer

Solution code:
s=input()
while True:
    s=s.replace(s[-1],'')
    if len(s)%2==0 and s[:len(s)//2]==s[len(s)//2:]:
      print(len(s))
      break

Submission status: Wrong Answer

Solution code:
s=input()
while True:
    s=s.replace(s[-1],'')
    if len(s)%2==0:
        if s[:len(s)//2]==s[len(s)//2:]:
          print(len(s))
          break

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
@author: H_Hoshigi
09min 20sec WA
17min 25sec
"""
# 偶文字列の長さは必ず偶数。
# len(S) == 2nのとき、2i文字取り去った後が、
# (n-i)文字を二つ並べたものかどうかを調べる。
# break を入れ忘れてWAした。

def main():
    S = input()
    n = len(S)//2
    answer = int()
    for i in range(1, n):
        print(S[:(n-i)], S[(n-i):2*(n-i)])
        if S[:(n-i)] == S[(n-i):2*(n-i)]:
            answer = 2*(n-i)
            break
    print(answer)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
@author: H_Hoshigi

"""
# 偶文字列の長さは必ず偶数。
# len(S) == 2nのとき、2i文字取り去った後が、
# (n-i)文字を二つ並べたものかどうかを調べる。

def main():
    S = input()
    n = len(S)//2
    answer = int()
    for i in range(1, n):
        if S[:(n-i)] == S[(n-i):2*(n-i)]:
            answer = 2*(n-i)
    print(answer)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':
    s = input()
    for i in range(1,len(s)):
        s2 = s[:len(s)-i]
        count =0
        if len(s2) % 2 ==0:
            for j in range(len(s2)// 2):
                if s2[j] == s2[len(s2) -j-1]:
                    count+=1

            if count == len(s2)//2:
                print(len(s2))
                break