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:
def func(x):
    for i_ in range(len(x)//2 + 1):
        y = x[:i_+1]
        if len(x) % len(y) != 0:
            continue
        count = 0
        for j_ in range(len(x)//len(y)):
            if x[len(y)*j_:len(y)*(j_+1)] != y:
                break
            count += 1
            if count == len(x)//len(y):
                return x
    return ''


S = input()

ans = ' '
if len(S) > 2:
    for i in range(len(S)):
        ans = func(S[:-2*i-2])
        if ans != '':
            break
else:
    ans = S[0]
print(len(ans))

Submission status: Wrong Answer

Solution code:
def func(x):
    for i_ in range(len(x)//2 + 1):
        y = x[:i_+1]
        if len(x) % len(y) != 0:
            continue
        count = 0
        for j_ in range(len(x)//len(y)):
            if x[len(y)*j_:len(y)*(j_+1)] != y:
                break
            count += 1
            if count == len(x)//len(y):
                return x
    return ''


S = input()

ans = ' '
for i in range(len(S)):
    ans = func(S[:-2*i-2])
    if ans != '':
        break
print(len(ans))

Submission status: Wrong Answer

Solution code:
def func(x):
    for i_ in range(len(x)//2 + 1):
        y = x[:i_+1]
        if len(x) % len(y) != 0:
            continue
        count = 0
        for j_ in range(len(x)//len(y)):
            if x[len(y)*j_:len(y)*(j_+1)] != y or x == y:
                break
            count += 1
            if count == len(x)//len(y):
                return x
    return ''


S = input()

ans = ' '
for i in range(len(S)):
    ans = func(S[:-2*i-2])
    if ans != '':
        break
print(len(ans))

Submission status: Wrong Answer

Solution code:
def func(x):
    for i_ in range(len(x)):
        y = x[:i_+1]
        if len(x) % len(y) != 0:
            continue
        count = 0
        for j_ in range(len(x)//len(y)):
            if x[len(y)*j_:len(y)*(j_+1)] != y or x == y:
                break
            count += 1
            if count == len(x)//len(y):
                return x
    return ''


S = input()

ans = ' '
for i in range(len(S)):
    ans = func(S[:-2*i-2])
    if ans != '':
        break
print(len(ans))

Submission status: Wrong Answer

Solution code:
def func(x):
    for i_ in range(len(x)):
        y = x[:i_+1]
        if len(x) % len(y) != 0 or len(x) % 2 == 1:
            continue
        count = 0
        for j_ in range(len(x)//len(y)):
            if x[len(y)*j_:len(y)*(j_+1)] != y or x == y:
                break
            count += 1
            if count == len(x)//len(y):
                return x
    return ''


S = input()

ans = ' '
for i in range(len(S)):
    ans = func(S[:-2*i-2])
    if ans != '':
        break
print(len(ans))

Submission status: Wrong Answer

Solution code:
def func(x):
    for i_ in range(len(x)//2):
        y = x[:2*i_+1]
        if len(x) % len(y) != 0:
            continue
        count = 0
        for j_ in range(len(x)//len(y)):
            if x[len(y)*j_:len(y)*(j_+1)] != y:
                break
            else:
                count += 1
            if count == len(x)//len(y):
                return x
    return ''


S = input()

ans = ' '
for i in range(len(S)):
    ans = func(S[:-2*i-2])
    if ans != '':
        break
print(len(ans))

Submission status: Wrong Answer

Solution code:
def func(x):
    for i_ in range(len(x)):
        y = x[:i_+1]
        if len(x) % len(y) != 0 or len(x) % 2 == 1:
            continue
        count = 0
        for j_ in range(len(x)//len(y)):
            if x[len(y)*j_:len(y)*(j_+1)] != y or x == y:
                break
            count += 1
            if count == len(x)//len(y):
                return x
    return ''


S = input()

ans = ' '
for i in range(len(S)):
    ans = func(S[:-2*i-1])
    if ans != '':
        break
print(len(ans))

Submission status: Wrong Answer

Solution code:
def func(x):
    for i_ in range(len(x)):
        y = x[:i_+1]
        if len(x) % len(y) != 0 or len(x) % 2 == 1:
            continue
        count = 0
        for j_ in range(len(x)//len(y)):
            if x[len(y)*j_:len(y)*(j_+1)] != y or x == y:
                break
            count += 1
            if count == len(x)//len(y):
                return x
    return ''


S = input()

ans = ' '
for i in range(len(S)):
    ans = func(S[:-i-1])
    if ans != '':
        break
print(len(ans))

Submission status: Wrong Answer

Solution code:
def func(x):
    for i_ in range(len(x)):
        y = x[:i_+1]
        if len(x) % len(y) != 0 or len(x) % 2 == 1:
            continue
        count = 0
        for j_ in range(len(x)//len(y)):
            if x[len(y)*j_:len(y)*(j_+1)] != y or x == y:
                break
            count += 1
            if count == len(x)//len(y):
                return x
    return ''


S = input()

ans = ' '
for i in range(len(S)):
    ans = func(S[:-i-1])
    if ans != '':
        break
print(ans, len(ans))

Submission status: Wrong Answer

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

import sys
# import time
# import math
# import numpy as np
# import scipy.sparse.csgraph as cs            # csgraph_from_dense(ndarray, null_value=inf), bellman_ford(G, return_predecessors=True), dijkstra, floyd_warshall
# import random                                # random, uniform, randint, randrange, shuffle, sample
# import string                                # ascii_lowercase, ascii_uppercase, ascii_letters, digits, hexdigits
# import re                                    # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s)
# from bisect import bisect_left, bisect_right # bisect_left(a, x, lo=0, hi=len(a)) returns i such that all(val<x for val in a[lo:i]) and all(val>-=x for val in a[i:hi]).
# from collections import deque                # deque class. deque(L): dq.append(x), dq.appendleft(x), dq.pop(), dq.popleft(), dq.rotate()
# from collections import defaultdict          # subclass of dict. defaultdict(facroty)
# from collections import Counter              # subclass of dict. Counter(iter): c.elements(), c.most_common(n), c.subtract(iter)
# from datetime import date, datetime          # date.today(), date(year,month,day) => date obj; datetime.now(), datetime(year,month,day,hour,second,microsecond) => datetime obj; subtraction => timedelta obj
# from datetime.datetime import strptime       # strptime('2019/01/01 10:05:20', '%Y/%m/%d/ %H:%M:%S') returns datetime obj
# from datetime import timedelta               # td.days, td.seconds, td.microseconds, td.total_seconds(). abs function is also available.
# from copy import copy, deepcopy              # use deepcopy to copy multi-dimentional matrix without reference
# from functools import reduce                 # reduce(f, iter[, init])
# from functools import lru_cache              # @lrucache ...arguments of functions should be able to be keys of dict (e.g. list is not allowed)
# from heapq import heapify, heappush, heappop # built-in list. heapify(L) changes list in-place to min-heap in O(n), heappush(heapL, x) and heappop(heapL) in O(lgn).
# from heapq import nlargest, nsmallest        # nlargest(n, iter[, key]) returns k-largest-list in O(n+klgn).
# from itertools import count, cycle, repeat   # count(start[,step]), cycle(iter), repeat(elm[,n])
# from itertools import groupby                # [(k, list(g)) for k, g in groupby('000112')] returns [('0',['0','0','0']), ('1',['1','1']), ('2',['2'])]
# from itertools import starmap                # starmap(pow, [[2,5], [3,2]]) returns [32, 9]
# from itertools import product, permutations  # product(iter, repeat=n), permutations(iter[,r])
# from itertools import combinations, combinations_with_replacement
# from itertools import accumulate             # accumulate(iter[, f])
# from operator import itemgetter              # itemgetter(1), itemgetter('key')
# from fractions import gcd                    # for Python 3.4 (previous contest @AtCoder)



def main():
    mod = 1000000007                # 10^9+7
    inf = float('inf')              # sys.float_info.max = 1.79...e+308
    # inf = 2 ** 64 - 1             # (for fast JIT compile in PyPy) 1.84...e+19
    sys.setrecursionlimit(10**6)    # 1000 -> 1000000
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    def check_even_string(s):
        n = len(s)
        assert n >= 2 and n % 2 == 0
        for i in range(n//2):
            if s[i] != s[i+n//2]:
                return False
        return True
    

    
    s = input()
    n = len(s)
    for i in range(2, n - 1, 2):
        if check_even_string(s[:i]):
            print(i)
            exit()


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
s = list(input())
c = 0
max_len = 0
s.pop(len(s)-1)
for i in range((len(s)//2 + len(s) % 2)):
    if len(s) % 2 == 0:
        for j in range(len(s)//2):
            if s[j] == s[j+len(s)//2]:
                c += 1
        if c == len(s)//2 and max_len < c:
            max_len = c
        c = 0
    s.pop(len(s)-1)
print(max_len*2)

Submission status: Wrong Answer

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

def resolve():
    def main(x):
        xlen=len(x)
        if x[:xlen//2]==x[xlen//2:]:
            return True
        else:
            return False
    s=input()
    if len(s)==2:
        print(1)
    else:
        for i in range(2,len(s),2):
            if main(s[:-i]):
                print(len(s[:-i]))
resolve()

Submission status: Wrong Answer

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

def resolve():
    def main(x):
        xlen=len(x)
        if x[:xlen//2]==x[xlen//2:]:
            return True
        else:
            return False
    s=input()
    for i in range(2,len(s),2):
        if main(s[:-i]):
            print(len(s[:-i]))
resolve()

Submission status: Wrong Answer

Solution code:
s=input()
n=len(s)//2
while n!=0:
  
  if s[:n+1]==s[n+1:2*(n+1)]:
    print(2*(n+1))
    break
  n=-1

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()

n = len(s)

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

Submission status: Wrong Answer

Solution code:
S = input()
s = len(S)

if s == 2:
  print(1)

for i in range(1,s//2):
  a = s - i*2 
  if a != 0:
    test = S[0:a]
    n = 0
    while True:
      if n == a/2:
        print(len(test))
        break
      elif test[n] != test[n + a//2]:
        break
      else:
        n += 1
  else: 
    print(2)

Submission status: Wrong Answer

Solution code:
S = input()
s = len(S)

for i in range(1,s//2):
  a = s - i*2
  test = S[0:a]
  n = 0
  while True:
    if n == a/2:
      print(len(test))
      break
    elif test[n] != test[n + a//2]:
      break
    else:
      n += 1

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()

def judge_s(s):
    if len(s)%2==1:
        return False
    mid = len(s)//2
    if s[:mid]==s[mid:]:
        return True

for i in range(1, len(S)-1):
    if judge_s(S[:-i]):
        ans = S[:-i]
        break
else:
    print(len(ans))

Submission status: Wrong Answer

Solution code:
import math
import string
import collections
from collections import Counter


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


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor


# coordinates
dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]
s = input()
if len(s) == 2:
    print(0)
    exit()
cnt = 0
ans = 0
ss = ''
for i in range(len(s)):
    if len(s[:-(i+1)]) % 2 == 0:
        ss = s[:-(i+1)]
        # print(ss)
        cnt = 0
        for j in range(int(len(ss)/2)):
            # print(ss[j])
            # print(ss[j+int(len(ss)/2)])
            if ss[j] == ss[j+int(len(ss)/2)]:
                cnt += 1
        ans = max(ans, cnt)
print(ans*2)

Submission status: Wrong Answer

Solution code:
import math
import string
import collections
from collections import Counter


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


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor


# coordinates
dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]
s = input()
cnt = 0
ans = 0
ss = ''
for i in range(len(s)):
    if len(s[:-(i+1)]) % 2 == 0:
        ss = s[:-(i+1)]
        # print(ss)
        cnt = 0
        for j in range(int(len(ss)/2)):
            # print(ss[j])
            # print(ss[j+int(len(ss)/2)])
            if ss[j] == ss[j+int(len(ss)/2)]:
                cnt += 1
        ans = max(ans, cnt)
print(ans*2)

Submission status: Wrong Answer

Solution code:
import sys
from collections import Counter
from collections import deque
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

s=input()
while len(s)>0:
    if s[:len(s)//2]==s[len(s)//2:]:
        print(len(s))
        exit()
    s=s[:-1]

Submission status: Wrong Answer

Solution code:
def main():
    s = input()
    for i in range(len(s)):
        a = s[:-i]
        if len(a) % 2 == 1:
            continue
        len_a = len(a) // 2
        if a[:len_a] == a[len_a:]:
            print(len(a))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(n,1,-1):
    if i%2==0:
        if S[:i//2] == S[i//2:]:
            print(i//2)
            exit()

Submission status: Wrong Answer

Solution code:
def main():
    s = input()
    for i in range(1, len(s)):
        if i % 2 != 0:
            continue
        r = s[:-i]
        q = len(s[:-i])
        if r[:q//2] == r[q//2:]:
            ans = q
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
def main():
    s = input()
    for i in range(1, len(s)):
        r = s[:-i]
        q = len(s[:-i])
        if q % 2 != 0:
            continue
        if r[:q//2] == r[q//2:]:
            ans = q
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
S = input()

for i in range(1, len(S)):
  s = S[:-i]
  M = set(s)
  f = True
  for m in M:
    if s.count(m)%2 != 0:
      f = False
      break
  if f:
    print(len(S) - i)
    exit()

Submission status: Wrong Answer

Solution code:
S = input()

for i in range(1, len(S)):
  s = S[:-i]
  print(s)
  M = set(s)
  f = True
  for m in M:
    print(s.count(m)%2)
    if s.count(m)%2 != 0:
      f = False
      break
  if f:
    print(len(S) - i)
    exit()

Submission status: Wrong Answer

Solution code:
from collections import Counter
s = input()
ans=0

for i in range(-1,len(s)*-1-1,-1):
    t = s[len(s)*-1:i]
    if all(l%2==0 for l in Counter(t).values()):
        print(len(t))
        break

Submission status: Wrong Answer

Solution code:
S = list(input())

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

Submission status: Wrong Answer

Solution code:
S = [c for c in input()]
len_s = len(S)
for i in range(2,len_s//2+2,2):
    a = S[:(len_s-i)//2]
    b = S[(len_s-i)//2:len_s-i]
    if a == b:
        print(len(a) + len(b))
        exit()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, log2
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7
 
S = input()
print(len(S)-2)

Submission status: Wrong Answer

Solution code:
def main():
    from collections import deque
    s = deque(list(input()))
    while deque:
        t = s.pop()
        if len(s)%2 != 0:
            continue
        l = list(s)
        if l == l[::-1]:
            print(len(l))
            return 0

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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


def solve(S):
    # S: 文字列
    r = N % 2
    for i in range(N//2):
        s = S[:N-(2*i+r)]
        n = len(s)
        #print(s,i,n,s[:(n//2)],s[(n//2):])
        if s[:(n//2)] == s[(n//2):]:
            ans = N - (2 * i + r)
    return ans


print(solve(S))

Submission status: Wrong Answer

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


def solve(S):
    # S: 文字列
    r = N % 2
    for i in range((N+1)//2):
        s = S[:N-(2*i+r)]
        n = len(s)
        if s[:(n//2)] == s[(n//2):]:
            ans = N - (2 * i + r)
    return ans


print(solve(S))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    s = list(input())

    i = 0
    flg = False
    while not flg:
        if len(s) % 2 == 0:
            s.pop()
        else:
            s.pop()
            for i in range(1, len(s) // 2 + 1):
                ss = s[:i]
                for j in range(0, len(s), i):
                    if s[j: j + i] != ss:
                        break
                else:
                    flg = True
                    break
            i += 1

    print(len(s))


if __name__ == '__main__':
    resolve()

Submission status: Wrong Answer

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

trial=(n-1)//2
for i in range(trial):
  half=trial-i
  if s[:half]==s[half:2*half]:
    print(half*2)

Submission status: Wrong Answer

Solution code:
S = input()
L = len(S)

ans = None
for i in range(1,L):
  if (L - i) % 2 != 0:
    continue
  ns = S[:-i]
  h = (L - i) // 2
  m = ns[:h] + ns[:h]
  if ns == m:
    ans = ns
    break
    
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

s_rev = list(reversed(s))
n = len(s_rev)

for i in range(len(s_rev)):
  del s_rev[0]
  if len(s_rev) == 1:
    print(1)
    break
  elif len(s_rev) % 2 == 1:
    continue
  elif s[0:len(s_rev) // 2] != s[len(s_rev) // 2:len(s_rev)]:
    continue  
  elif len(s_rev) != 0:
    print(len(s_rev))

Submission status: Wrong Answer

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

s_rev = list(reversed(s))
n = len(s_rev)

for i in range(len(s_rev)):
  del s_rev[0]
  if len(s_rev) % 2 == 1:
    continue
  elif s[0:len(s_rev) // 2] != s[len(s_rev) // 2:len(s_rev)]:
    continue  
  elif len(s_rev) != 0:
    print(len(s_rev))

Submission status: Wrong Answer

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

s_rev = list(reversed(s))
n = len(s_rev)

for i in range(len(s_rev)):
  del s_rev[0]
  if s[0:len(s_rev) // 2] != s[len(s_rev) // 2:len(s_rev)]:
    continue  
  elif len(s_rev) != 0:
    print(len(s_rev))

Submission status: Wrong Answer

Solution code:
S = input()
flag = False
count = 0
for i in range(len(S)): #後ろから文字を消す
    S = S[0:len(S)-1]
    if len(S)%2==0: #Sが偶数文字数
        hl = int(len(S)/2)
        for k in range(hl): #Sの最初からと半分からが同じか判定
            if S[k]!=S[k+hl]:
                break
            else:
                count += 1
                
            if count == hl:
                print(hl*2)
                flag = True
                break

    if len(S) == 1:
        print(S[0])
    
    if flag:
        break

Submission status: Wrong Answer

Solution code:
S = input()
flag = False
count = 0
for i in range(len(S)): #後ろから文字を消す
    S = S[0:len(S)-1]
    if len(S)%2==0: #Sが偶数文字数
        hl = int(len(S)/2)
        for k in range(hl): #Sの最初からと半分からが同じか判定
            if S[k]!=S[k+hl]:
                break
            else:
                count += 1
                
            if count == hl:
                print(hl*2)
                flag = True
                break
    
    if flag:
        break

    if i == len(S)-1:
        print(S[0])

Submission status: Wrong Answer

Solution code:
S = input()
flag = False
count = 0
for i in range(len(S)): #後ろから文字を消す
    S = S[0:len(S)-1]
    if len(S)%2==0: #Sが偶数文字数
        hl = int(len(S)/2)
        for k in range(hl): #Sの最初からと半分からが同じか判定
            if S[k]!=S[k+hl]:
                break
            else:
                count += 1
                
            if count == hl:
                print(hl*2)
                flag = True
                break

    if flag:
        break

Submission status: Wrong Answer

Solution code:
S = input()
flag = False
count = 0
for i in range(len(S)): #後ろから文字を消す
    S = S[0:len(S)-1]
    if len(S)%2==0: #Sが偶数文字数
        hl = int(len(S)/2)
        for k in range(hl): #Sの最初からと半分からが同じか判定
            if S[k]!=S[k+hl]:
                break
            else:
                count += 1
                
            if count == hl:
                print(hl*2)
                flag = True
                break

    else:
        print(S[0])
    if flag:
        break

Submission status: Wrong Answer

Solution code:
S = input()
fl = len(S)
flag = False
count = 0
for i in range(fl): #後ろから文字を消す
    S = S[0:len(S)-1]
    if len(S)%2==0: #Sが偶数文字数
        hl = int(len(S)/2)
        for k in range(hl): #Sの最初からと半分からが同じか判定
            if S[k]!=S[k+hl]:
                break
            else:
                count += 1
                
            if count == hl:
                print(hl*2)
                flag = True
                break

    if flag:
        break

Submission status: Wrong Answer

Solution code:
S = input()
fl = len(S)
flag = False
count = 0
for i in range(fl): #後ろから文字を消す
    S = S[0:len(S)-1]
    if len(S)%2==0: #Sが偶数文字数
        hl = int(len(S)/2)
        for k in range(hl): #Sの最初からと半分からが同じか判定
            if S[k]!=S[k+hl]:
                break
            else:
                count += 1
        if count == hl:
            print(hl*2)
            flag = True
            break
    if flag:
        break

Submission status: Wrong Answer

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

remove=set()
for i,s in enumerate(S):
    if s in remove:
        remove.discard(s)
    else:
        remove.add(s)
    if len(remove) == 0:
        break
print(len(S) - i - 1)

Submission status: Wrong Answer

Solution code:
s_l = list(input())

for i in range(1,len(s_l)):
    s_l2 = s_l[:-i]
    s_l2r = s_l[:-i]
    s_l2r.reverse()
    if s_l2 == s_l2r:
        break

print(len(s_l2))

Submission status: Wrong Answer

Solution code:
def resolve():
    s = input()
    l = len(s)
    for i in range(2, len(s), 2):
        test = s[0:i]
        if test[0:(i//2)] == test[(i//2):i]:
            print(len(test))
            exit()
resolve()

Submission status: Wrong Answer

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

def f():
    for erase in range(1, N + 1):
        new = S[0 : N - erase]
        if len(new) % 2 == 1: continue
        flg = 1
        for i in range((N - erase) // 2):
            if new[i] != new[(N - erase) // 2 + i]: flg = 0
            break
        if not flg: continue
        return len(new)

print(f())

Submission status: Wrong Answer

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

def f():
    for erase in range(2, N + 1):
        new = S[0 : N - erase]
        if len(new) % 2 == 1: continue
        flg = 1
        for i in range((N - erase) // 2):
            if new[i] != new[(N - erase) // 2 + i]: flg = 0
            break
        if not flg: continue
        return len(new)

print(f())

Submission status: Wrong Answer

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

def f():
    for erase in range(2, N + 1, 2):
        new = S[0 : N - erase]
        flg = 1
        for i in range((N - erase) // 2):
            if new[i] != new[(N - erase) // 2 + i]: flg = 0
            break
        if not flg: continue
        return len(new)

print(f())

Submission status: Wrong Answer

Solution code:
S = input()
from collections import Counter
C = Counter(S)
ans = len(S)
for c in S[::-1]:
    C[c] -= 1
    ans -= 1
    if all(v%2==0 for v in C.values()):
        print(ans)
        exit()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = [i for i in input()]
while True:
    S.pop(-1)
    if len(S)%2==0:
        s = ''.join(S)
        s1 = s[:(len(S)//2)]
        s2 = s[len(S)//2:]
        print(s1, s2)
        if s1 == s2:
            print(len(S))
            exit(0)
    elif len(S)==0:
        print(0)
        exit(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
st=input()
for i in range(2,len(st),2):
    r=st[0:i]
    if r[0:i//2]==r[i//2:]:
        print(i)

Submission status: Wrong Answer

Solution code:
S = input()

odd = set()
odd.add(S[-1])
for i in range(len(S) - 2, -1, -1):
    if (S[i] in odd):
        odd.remove(S[i])
    else:
        odd.add(S[i])
    if len(odd) == 0:
        print(i)
        break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

Solution code:
S = input()

while True:
  if S[0:len(S)//2] == S[len(S)//2:len(S)-1]:
    print(len(S))
    exit()
  else:
    tmp = S[0:len(S)-2]
    S = tmp