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()
l = len(s)
h = l//2
if l%2==0:
    for i in range(1,h):
        if s[0:h-i] == s[h-i:-2*i]:
            print(len(s[:-2*i]))
else:
    for i in range(1,h):
        if s[0:h-i+1] == s[h-i+1:-2*i+1]:
            print(len(s[:-2*i+1]))

Submission status: Wrong Answer

Solution code:
s = input()
l = len(s)
if l == 3:
    print(1)
else:
    h = l//2
    if l%2==0:
        for i in range(1,h):
            if s[0:h-i] == s[h-i:-2*i]:
                print(len(s[:-2*i]))
    else:
        for i in range(1,h):
            if s[0:h-i+1] == s[h-i+1:-2*i+1]:
                print(len(s[:-2*i+1]))

Submission status: Wrong Answer

Solution code:
s = input()
l = len(s)
if l == 3:
    print(1)
h = l//2
if l%2==0:
    for i in range(1,h):
        if s[0:h-i] == s[h-i:-2*i]:
            print(len(s[:-2*i]))
else:
    for i in range(1,h):
        if s[0:h-i+1] == s[h-i+1:-2*i+1]:
            print(len(s[:-2*i+1]))

Submission status: Wrong Answer

Solution code:
s = input()
l = len(s)
if l == 3:
    print(1)
h = l//2
if l%2==0:
    for i in range(1,h):
        if s[0:h-i] == s[h-i:-2*i]:
            print(s[:-2*i])
else:
    for i in range(1,h):
        if s[0:h-i+1] == s[h-i+1:-2*i+1]:
            print(s[:-2*i+1])

Submission status: Wrong Answer

Solution code:
s = input()
l = len(s)
if l == 3:
    print(s[0])
h = l//2
if l%2==0:
    for i in range(1,h):
        if s[0:h-i] == s[h-i:-2*i]:
            print(s[:-2*i])
            print(len(s[:-2*i]))
else:
    for i in range(1,h):
        if s[0:h-i+1] == s[h-i+1:-2*i+1]:
            print(s[:-2*i+1])
            print(len(s[:-2*i+1]))

Submission status: Wrong Answer

Solution code:
# ABC066b
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

s = input()[:-1]


def isGu(st):
    if (len(st) % 2 != 0):
        return False
    flag = True
    for i in range(len(st) // 2):
        if (st[i] != st[i + len(st) // 2]):
            #print(i, i + len(st) // 2)
            flag = False
    return flag


for i in range(2, len(s), 2):
    if (isGu(s[:-i])):
        print(len(s[:-i]))

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
ret = ''
for i in range(n - 1, 0, -1):
    if len(s[:i]) % 2 == 1:
        continue
    if s[:i // 2] == s[i // 2:i][::-1]:
        ret = s[:i]
        break
print(len(ret))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = list(input())
while True:
  s.pop()
  c = len(s) // 2
  if s[:c] == s[c:]:
    print(c)
    exit()

Submission status: Wrong Answer

Solution code:
s = input()
alphabet = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m"\
        , "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]

ans = 0
used = dict()
for i in range(len(s) - 1):
  if s[i] in used:
    used[s[i]] += 1
    for k in used:
      if used[k] % 2 == 1: break
    else: ans = i + 1
  else: used[s[i]] = 1
print(ans)

Submission status: Wrong Answer

Solution code:
s = input()
alphabet = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m"\
        , "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]
convert = dict()
for i in range(26):
  convert[alphabet[i]] = i
deleted = dict()
deleted[convert[s[-1]]] = 1
for i in range(len(s) - 1):
  if convert[s[-2 - i]] in deleted:
    deleted[convert[s[-2 - i]]] += 1
    fin = False
    for k in deleted:
      if deleted[k] % 2 == 1: break
    else: fin = True
    if fin:
      print(len(s) - i - 2)
      break
  else: deleted[convert[s[-2 - i]]] = 1
else: print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

import sys
input = sys.stdin.readline


def main():
    s = str(input())

    s1 = s[:int(len(s)/2)]
    s2 = s[int(len(s)/2):]

    for i in range(2, len(s), 2):
        s_new = s[:i]
        if s_new[:int(len(s_new)/2)] == s_new[int(len(s_new)/2):]:
            print(len(s_new))
            return


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
for i in reversed(range(len(s)-1)):
  if (i + 1) % 2 == 0:
    ss = s[:i+1]
#    print(ss)
#    print(ss[:int((i+1)/2)], ss[int((i+1)/2):])
    if ss[:int((i+1)/2)] == ss[int((i+1)/2):]:
      print(i+1)

Submission status: Wrong Answer

Solution code:
s=input()
s=s[:len(s)-1]
flag=True

while(flag):
    if len(s)%2==0:
        left=s[:len(s)//2] 
        right=s[len(s)//2:]
        print(left,right)
        if left==right:
            print(len(s))
            flag=False
        else:
            s=s[0:len(s)-1]
    else:
        s=s[0:len(s)-1]
        print(s)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = list(input())
l = len(s)//2

l2 = 0
ans = 0
print(s)
for i in range(1,len(s)//2):
  s2 = s[0:-2*i]
  print(s2)
  l2 = len(s2)//2
  if s2[0:l2]==s2[l2:]:
    ans = len(s2)
    break

print (ans)

Submission status: Wrong Answer

Solution code:
s = input()

max_len=0
for i in range(2,len(s)):
    if all([s[:i].count(j)%2==0 for j in set(s)]):
        max_len=i
print(max_len)

Submission status: Wrong Answer

Solution code:
s = input()

max_len=0
for i in range(2,len(s)-1):
    if all([s[:i].count(j)%2==0 for j in set(s)]):
        max_len=i
print(max_len)

Submission status: Wrong Answer

Solution code:
# ss
def is_evenstring(s):
    if s[0:len(s)//2] == s[len(s)//2:]:
        return True
    else:
        return False

# input
S = input()

# test
for i in range(3, len(S), 2):
    if is_evenstring(S[-i::-1]):
        res = len(S[-i::-1])

print(res)

Submission status: Wrong Answer

Solution code:
# ss
def is_oddstring(s):
    if s[0:len(s)//2] == s[len(s)//2:]:
        return True
    else:
        return False

# input
S = input()

# test
for i in range(1, len(S)):
    # print(S[-_::-1])
    if is_oddstring(S[-i::-1]):
        res = len(S[-i::-1])

print(res)

Submission status: Wrong Answer

Solution code:
# ss
def is_oddstring(s):
    if len(s) % 2 != 0:
        return False
    else:
        if s[0:len(s)//2] == s[len(s)//2:]:
            return True
        else:
            return False

# input
S = input()

# test
for _ in range(1, len(S)):
    # print(S[-_::-1])
    if is_oddstring(S[-_::-1]):
        res = len(S[-_::-1])

print(res)

Submission status: Wrong Answer

Solution code:
'''
s = input()
n = len(s)
can = []
for i in range(1,n):
  pre = s[:i]
  pst = s[i:]
  p = len(pre)
  here = 0
  cnt = 0
  for j in range(p):
    while True:
      if here == len(pst):
        break
      if pre[j] == pst[here]:
        cnt += 1
        here += 1
        break
      here += 1
  can.append([cnt,pre,pst])
maxi = max(can)[0]
if n == 2 * maxi:
  print( n - 2 )
else:
  print( 2 * maxi )
print(can)
'''
s = input()
n = len(s)
for i in range(n-1):
  s = s[:-1]
  if len(s) % 2 != 0:
    continue
  else:
    p = len(s) // 2
    pre = s[:p]
    pst = s[p:]
    if pre == pst:
      print(2*p)

Submission status: Wrong Answer

Solution code:
s = input()

cnt = len(s)
while True:
    if s[:len(s) // 2] == s[len(s) // 2:]:
        break
    s = s[:-2]
    cnt -= 2


print(cnt)

Submission status: Wrong Answer

Solution code:
s = input()

cnt = len(s)
while True:
    if s[:len(s) // 2] == s[len(s) // 2:]:
        break
    s = s[:-2]
    cnt -= 2

Submission status: Wrong Answer

Solution code:
s = input()

ans = 0
for i in range(len(s)-1, 1, -1):
    s_l = s[:i]
    if len(s_l)%2==1:
        continue
    else:
        if s_l[:len(s_l)//2] == s_l[len(s_l)//2:]:
            ans = len(s_l)
if len(s)<= 3:
    print(1)
else:
    print(ans)

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

Solution code:
s = input()

ans = 0
for i in range(len(s)-1, 1, -1):
    s_l = s[:i]
    if len(s_l)%2==1:
        continue
    else:
        if s_l[:len(s_l)//2] == s_l[len(s_l)//2:]:
            ans = len(s_l)

if ans ==0:
    print(1)
else:
    print(ans)

Submission status: Wrong Answer

Solution code:
s = input()

ans = 0
for i in range(len(s)-1, 1, -1):
    s_l = s[:i]
    if len(s_l)%2==1:
        continue
    else:
        if s_l[:len(s_l)//2] == s_l[len(s_l)//2:]:
            ans = len(s_l)

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
s = input()
l = len(s)
del_len_max = l-2
del_len_min = 1 if l%2 == 1 else 2
if del_len_min == del_len_max:
    print(del_len_max)
for i in range(del_len_min, del_len_max+2, 2):
    before = s[0:(l-i)//2]
    after = s[(l-i)//2:l-i]
    if before == after:
        print(l-i)
        sys.exit()

Submission status: Wrong Answer

Solution code:
s = input()
l = len(s)
del_len_max = l-2
del_len_min = 1 if l%2 == 1 else 2
if del_len_min == del_len_max:
    print(del_len_max)
for i in range(del_len_min, del_len_max+2, 2):
    before = s[0:(l-i)//2]
    after = s[(l-i)//2:l-i]
    if before == after:
        print(l-i)

Submission status: Wrong Answer

Solution code:
s = input()
l = len(s)
del_len_max = l-2
del_len_min = 1 if l%2 == 1 else 2
if del_len_min == del_len_max:
    print(del_len_max)
for i in range(del_len_min, del_len_max, 2):
    before = s[0:(l-i)//2]
    after = s[(l-i)//2:l-i]
    if before == after:
        print(l-i)

Submission status: Wrong Answer

Solution code:
S = input()
if len(S)%2 != 0:
  S = S + '?'
for i in range(len(S)-1)[::-2]:
  if S[:i//2] == S[i//2+1:i]:
    print(i)
    break

Submission status: Wrong Answer

Solution code:
S = input()
if len(S)%2 != 0:
  S = S + '?'
for i in range(len(S)-1)[::-2]:
  if S[:i//2] == S[i//2+1:i]:
    print(i//2)
    break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from collections import defaultdict
d = defaultdict(int)
s = input()
m = 0
for i in range(len(s)-1):
  flag = 0
  d[s[i]] += 1
  for j in d.values():
    if j % 2 != 0:
      flag = 1
      break
  if flag == 0:
    m = i + 1
print(m)

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
ans = 0
for i in range(1,len(s)+1):
    if s[:i*2].count(s[:i]) == 2:
        ans = len(s[:i]) * 2
        break
print(ans)

Submission status: Wrong Answer

Solution code:
S = input()
s_list = list(S)
n = len(s_list)

for i in range(1,n):
    a = s_list[:-i]
    if a == a[::-1] and len(a)%2 == 0:
        break
    
print(n-i)

Submission status: Wrong Answer

Solution code:
S = input()
s_list = list(S)
n = len(s_list)

for i in range(1,n):
  if s_list[:-i] == s_list[:-i][::-1]:
    break
    
print(i)

Submission status: Wrong Answer

Solution code:
s = input()

while len(s) > 1:
  if len(s) == 1:
    print(1)
    break
  if len(s) % 2 == 0:
    s = s[:-2]
    mid = len(s) // 2
    if s[:mid] == s[mid:]:
      print(len(s))
  elif len(s) % 2 != 0:
    s = s[:-1]
    mid = len(s) // 2
    if s[:mid] == s[mid:]:
      print(len(s))

Submission status: Wrong Answer

Solution code:
s = input()

while len(s) > 2:
  if len(s) % 2 == 0:
    s = s[:-2]
    mid = len(s) // 2
    if s[:mid] == s[mid:]:
      print(len(s))
  else:
    s = s[:-1]
    mid = len(s) // 2
    if s[:mid] == s[mid:]:
      print(len(s))

Submission status: Wrong Answer

Solution code:
s = input().rstrip()[::-1]
result = 0

for i in range(len(s)-2, 0, -2):
    tmp = s[i:]
    half = len(tmp)//2
    if tmp[:half] == tmp[half:]:
        result = half*2
        break

print(result)

Submission status: Wrong Answer

Solution code:
s = input().rstrip()[::-1]
length = len(s)
result = 0

for i in range(length-2, 0, -2):
    tmp = s[i:length]
    half = len(tmp)//2
    if tmp[:half] == tmp[half:]:
        result = half*2
        break

print(result)

Submission status: Wrong Answer

Solution code:
s = list(input())
a = []
b = []
for i in range(len(s)):
  s.pop()
  if len(s) % 2 == 0:
    for j in range(len(s)):
      if j <= len(s) // 2 - 1:
        a.append(s[j])
      elif j <= len(s) // 2:
        b.append(s[j])
    if a == b:
      print(len(s))
      break

Submission status: Wrong Answer

Solution code:
s = input()

if len(s) == 2:
    print(1)
    exit()

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

Submission status: Wrong Answer

Solution code:
s = input()

if len(s) == 2:
    print(1)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()

length = len(S)
for i in range(length-3, 0, -2):
    l = i // 2 + 1
    if S[:l] == S[l:l+l]:
        print(2*l)

Submission status: Wrong Answer

Solution code:
s = input()
for i in range(len(s)):
    text = s[0:-i]
    
    if len(text)%2==0 and len(text)!=0:
        n = len(text)//2
        if text[:n] == text[n:]:
            print(len(text))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
if len(S) % 2 == 1:
    S = S[:-1]
else:
    S = S[:-2]
N = len(S) // 2
print(S[:N], S[N:2*N])
while S[:N] != S[N:2*N]:
    N -= 1
print(2*N)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S=input()
N=len(S)
for i in range(1,N):
    print(S[:N-i])
    if len(S[:N-i])%2==0 and S[:(N-i)//2]==S[(N-i)//2:N-i]:
        print(N-i)
        quit()

Submission status: Wrong Answer

Solution code:
s=input()
for i in range(1,len(s)):
  news = s[:-1*i]
  nv = len(news)
  if nv % 2 == 1: continue
  if news[0:nv//2] == news[nv//2:]:
    print(nv//2)
    break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
S = S[:-2 if len(S) % 2 == 0 else -1]

for i in range(0,len(S)//2)[::-1]:
    if S[:i] == S[i:i*2]:
        print(i*2)
        break

Submission status: Wrong Answer

Solution code:
s = list(input())
for i, w in enumerate(s):
  s.pop()
  if len(s) % 2 == 0:
    a = int(len(s) / 2)
    if s[:a] == s[a:]:
      print(len(s))
      break

Submission status: Wrong Answer

Solution code:
S = input()

#残り文字数
lest = len(S)

while 1:
  if S[:lest//2]==S[lest//2:]:
    print(lest)
    exit()
  else:
    lest -= 2
    S = S[:lest]

Submission status: Wrong Answer

Solution code:
ls = list(input())
l = len(ls)
from collections import Counter
if l == 2:
    print(0)
else:
    for i in range(1,l):
        lsls = ls[:(l-2*i)]
        cnt = Counter(lsls)
        flg = 0
        for j in cnt.values():
            if j%2==1:
                flg = 1
        if flg==0:
            break

    print(l-i*2)

Submission status: Wrong Answer

Solution code:
ls = list(input())
l = len(ls)
from collections import Counter

for i in range(1,l):
    lsls = ls[:(l-2*i)]
    cnt = Counter(lsls)
    flg = 0
    for j in cnt.values():
        if j%2==1:
            flg = 1
    if flg==0:
        break

print(l-i*2)

Submission status: Wrong Answer

Solution code:
ls = list(input())
l = len(ls)
from collections import Counter

for i in range(1,l):
    lsls = ls[:(l+1-2*i)]
    cnt = Counter(lsls)
    flg = 0
    for i in cnt.values():
        if i%2==1:
            flg = 1
    if flg==0:
        break
print(l-i*2)

Submission status: Wrong Answer

Solution code:
ls = list(input())
l = len(ls)
from collections import Counter
def solve(s,j):
    s.pop(-1)
    cnt = Counter(s)
    for i in cnt.values():
        if i%2==1:
            return solve(s,j+1)
            
    
    return j


i = solve(ls,1)
print(l-i)

Submission status: Wrong Answer

Solution code:
ls = list(input())
l = len(ls)
from collections import Counter
def solve(s,j):
    s.pop(-1)
    cnt = Counter(s)
    for i in cnt.values():
        if i%2==1:
            return solve(s,j+1)
            
        else:
            return j


i = solve(ls,1)
print(l-i)

Submission status: Wrong Answer

Solution code:
ls = list(input())
from collections import Counter
def solve(s,j):
    s.pop(-1)
    cnt = Counter(s)
    for i in cnt.values():
        if i%2==1:
            return solve(s,j+1)
            
        else:
            return j


i = solve(ls,1)
print(len(ls))

Submission status: Wrong Answer

Solution code:
s = list(input())
from collections import Counter
def solve(s,i):
    s.pop(-1)
    cnt = Counter(s)
    for i in cnt.values():
        if i%2==1:
            return solve(s,i+1)
            break
        else:
            return(print(i))

solve(s,1)

Submission status: Wrong Answer

Solution code:
s=list(input())
ss=[]
for i in range((len(s)//2)):
    ss.append(s[i])
    if(ss==s[i+1:i+1+len(ss)] and ((len(ss)*2)<len(s))):
        print(len(ss)*2)
        break

Submission status: Wrong Answer

Solution code:
s=list(input())
ss=[]
for i in range((len(s)//2)):
    ss.append(s[i])
    if(ss==s[i+1:i+1+len(ss)] and ((len(ss)*2)<len(s))):
        print(len(ss)*2)

Submission status: Wrong Answer

Solution code:
s=list(input())
ss=[]
for i in range((len(s)//2)-1):
    ss.append(s[i])
    if(ss==s[i+1:i+1+len(ss)]):
        print(len(ss)*2)

Submission status: Wrong Answer

Solution code:
s=list(input())
ss=[]
print(ss)
for i in range((len(s)//2)-1):
    ss.append(s[i])
    if(ss==s[i+1:i+1+len(ss)]):
        print(len(ss)*2)

Submission status: Wrong Answer

Solution code:
s=input()
ans=len(s)
def check(m):
  a=len(m)
  if a%2==1:
    return False
  else:
    if s[0:m//2]==s[m//2:m]:
      return True
    else:
      return False
for i in range(1,len(s),-1):
  ans-=1
  if check(s[0:i]):
    print(ans)

Submission status: Wrong Answer

Solution code:
S = input()
for i in range(len(S)//2, 0, -1):
  if S.find(S[:i], i) == i:
    break
print(i*2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()

for i in range(1,len(S)):
    if i%2 == 1:continue
    tmp = S[:i//2]
    print(tmp,S[i//2:i])
    if S[i//2:i] == tmp:
        ans = i
        
print(ans)

Submission status: Wrong Answer

Solution code:
s = input()
s_list = []

for i in s:
    s_list.append(i)
del s_list[-1]

while True:
    s_half = int(len(s_list)/2)
    s1 = s_list[:s_half]
    s2 = s_list[s_half:]
    print(s1)
    print(s2)
    if s1 == s2:
        print(s_half*2)
        break
    else:
        del s_list[-1]

Submission status: Wrong Answer

Solution code:
s = input()

for i in range(1, len(s)):
    ss = s[:-i]
    if ss == ss[::-1]:
        print(len(ss))
        exit()

Submission status: Wrong Answer

Solution code:
s=list(input())
ans=0
x=len(s)
for i in range(x+1):
    s.pop(-1)
    ans+=1
    if len(s)%2==0 and s[0:i-1]==s[i:-1]:
        print(s)
        break

print(len(s))

Submission status: Wrong Answer

Solution code:
S=list(input())
S.pop()
if len(S)==1:
    print(1)
else:
    for i in range((len(S)//2)+2):
        h=len(S)
        if h%2==0:
            m=0
            for k in range(len(S)//2):
                if S[k]!=S[k+(len(S)//2)]:
                    m=1
            if m==0:
                print(len(S))
                break
            else:
                S.pop()
                continue
        elif h==1:
            print(1)
            break
        else:
            S.pop()
            continue

Submission status: Wrong Answer

Solution code:
S=list(input())
S.pop()
if len(S)==1:
    print(1)
else:
    for i in range(len(S)//2+2):
        h=len(S)
        if h%2==0:
            m=0
            for k in range(len(S)//2):
                if S[k]!=S[k+len(S)//2]:
                    m=1
            if m==0:
                print(len(S))
                break
            else:
                S.pop()
                continue
        else:
            S.pop()
            continue

Submission status: Wrong Answer

Solution code:
S=list(input())
S.pop()
for i in range(len(S)//2+2):
    h=len(S)
    if h%2==0:
        m=0
        for k in range(len(S)//2):
            if S[k]!=S[k+len(S)//2]:
                m=1
        if m==0:
            print(len(S))
            break
        else:
            S.pop()
            continue
    else:
        S.pop()
        continue

Submission status: Wrong Answer

Solution code:
s=input()
n=int(len(s)/2)
for i in range(1,n):
    s_ = s[:-2*i]
    n_ = int(len(s_)/2)
    if s_[:n_] == s_[n_:]:
        print(len(s_))

Submission status: Wrong Answer

Solution code:

def read_input():
    s = input()
    return s

def check_even_string(s):
    if len(s) % 2:
        return False

    mid = len(s)//2
    if s[:mid] == s[mid:]:
        return True

    return False


def submit():
    s = read_input()

    for i in range(1, len(s)):
        if check_even_string(s[:-i]):
            print(len(s[:-i]))

if __name__ == '__main__':
    submit()

Submission status: Wrong Answer

Solution code:
S = input()

def check(s):
    n = len(s)
    if n%2 != 0:
        return False
    else:
        s1 = s[:(n//2)]
        s2 = s[(n//2):]
        if s1 == s2:
            return True
        else:
            return False

for i in range(len(S), 0, -1):
    if check(S[:i+1]):
        ans = len(S[:i])

print(ans)

Submission status: Wrong Answer

Solution code:
S = input()

def check(s):
    n = len(s)
    if n%2 != 0:
        return False
    else:
        s1 = s[:(n//2)]
        s2 = s[(n//2):]
        if s1 == s2:
            return True
        else:
            return False

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
print(len(input())-2)

Submission status: Wrong Answer

Solution code:
s = input()

for i in range(1, len(s)-1):
    l = len(s[:-i])
    if l % 2 != 0:
        continue
    else:
        if s[:int(l/2)] == s[int(l/2):-i]:
            print(l)
        else:
            continue

Submission status: Wrong Answer

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

for i in range(1, len(s)-1):
    l = len(s[i:])
    if l % 2 != 0:
        continue
    else:
        if s[i:(i + int(l/2))] == s[(i + int(l/2)):]:
            print(l)
        else:
            continue

Submission status: Wrong Answer

Solution code:
from functools import reduce
import math

def main():
    # 文字列の2進数を数値にする
    # '101' → '5'
    # 文字列の頭に'0b'をつけてint()にわたす
    # binary = int('0b'+'101',0)

    # 2進数で立っているbitを数える
    # 101(0x5) → 2
    # cnt_bit = bin(5).count('1')
    
    # N! を求める
    # f = math.factorial(N)
    
    # 切り捨て
    # 4 // 3
    # 切り上げ
    #-(-4 // 3)
    
    # 初期値用:十分大きい数(100億)
    INF = float("inf")
    
    # 1文字のみを読み込み
    # 入力:2
    # a = input().rstrip()
    # 変数:a='2'
    
    # スペース区切りで標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a, b, c, d = (int(_) for _ in input().split())  
    # 変数:a=2 b=4 c=5 d =7
    
    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a = list(int(_) for _ in input().split())
    # 変数:a = [2, 4, 5, 7]    

    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2457
    # a = list(int(_) for _ in input())
    # 変数:a = [2, 4, 5, 7]    
    S = list(_ for _ in input())
    ans = 1

    for i in range(len(S)):
        if(len(S)%2 == 1 or i ==0):
            S.pop(len(S)-1)
            continue
        mid = len(S)//2

        if(S[:mid] == S[mid:]):
            ans = len(S)
        S.pop(len(S)-1)
    print(ans)
    
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

for i in range(1, len(s)):
    l = len(s[i:])
    if l % 2 != 0:
        continue
    else:
        if s[i:(i + int(l/2))] == s[(i + int(l/2)):]:
            print(l)
        else:
            continue

Submission status: Wrong Answer

Solution code:
from functools import reduce
import math

def main():
    # 文字列の2進数を数値にする
    # '101' → '5'
    # 文字列の頭に'0b'をつけてint()にわたす
    # binary = int('0b'+'101',0)

    # 2進数で立っているbitを数える
    # 101(0x5) → 2
    # cnt_bit = bin(5).count('1')
    
    # N! を求める
    # f = math.factorial(N)
    
    # 切り捨て
    # 4 // 3
    # 切り上げ
    #-(-4 // 3)
    
    # 初期値用:十分大きい数(100億)
    INF = float("inf")
    
    # 1文字のみを読み込み
    # 入力:2
    # a = input().rstrip()
    # 変数:a='2'
    
    # スペース区切りで標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a, b, c, d = (int(_) for _ in input().split())  
    # 変数:a=2 b=4 c=5 d =7
    
    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a = list(int(_) for _ in input().split())
    # 変数:a = [2, 4, 5, 7]    

    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2457
    # a = list(int(_) for _ in input())
    # 変数:a = [2, 4, 5, 7]    
    S = list(_ for _ in input())
    ans = 0

    for i in range(len(S)):
        if(len(S)%2 == 1 or i ==0):
            S.pop(len(S)-1)
            continue
        mid = len(S)//2

        if(S[:mid] == S[mid:]):
            ans = len(S)
        S.pop(len(S)-1)
    print(ans)
    
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = list(input())
for i in range(len(s)):
    del s[-1]
    s = "".join(s)
    print(s)
    if s[0:len(s)//2]*2 == s:
        print(len(s))
        break
    s = list(s)

Submission status: Wrong Answer

Solution code:
n = input()

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

print(len(n))

Submission status: Wrong Answer

Solution code:
import sys

def main():
    input = sys.stdin.readline
    S = list(map(str, input().strip()))

    S = S[:-2]
    while len(S) > 2:
        n = len(S) // 2
        a = ''.join(S[:n])
        b = ''.join(S[n:])

        if a == b:
            return 2 * n
        else:
            S = S[:-2]


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

Submission status: Wrong Answer

Solution code:
hoge=input()

for i in range(len(hoge)):
  n=int(len(hoge)/2)
  print(hoge[n:])
  print(hoge[:n])
  if(hoge[n:]==hoge[:n]):
    print(2*n)
    break
  else:
    hoge=hoge[:len(hoge)-1]
    print(hoge)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
i = 0
while i < len(S) / 2:
    S = S[:(len(S) - 2)]
    if S[:int(len(S) / 2)] == S[int(len(S) / 2):]:
        print(len(S))
        break
    else:
        i += 1