ZhenlongDai/ACPR huggingface dataset:
Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S,T=input().split()
A,B=map(int,input().split())
U=input()
print(S, T)
if(U==S):
    print(A-1, B)
else:
    print(A, B-1)

Failing test case input:
red blue
11 -3
red

Expected output:
10 -3


Actual output:
red blue
10 -3


Fixed submission (verdict: Accepted):
S,T=input().split()
A,B=map(int,input().split())
U=input()
if(U==S):
    print(A-1, B)
else:
    print(A, B-1)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
input = sys.stdin.readline

S, T = input().split()
A, B = map(int, input().split())
U = input()

if S==U:
  print(A-1,B)

if T==U:
  print(A,B-1)

Failing test case input:
red lueb
9 1
red

Expected output:
8 1


Actual output:

Fixed submission (verdict: Accepted):
S, T = input().split()
A, B = map(int, input().split())
U = input()

if S==U:
  print(A-1,B)
else:
  print(A,B-1)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
ball = input().split()
number = list(map(int, input().split()))
U = input()

if U == ball[0]:
    number[0] -= 1
else:
    number[1] -= 1
print(number)


Failing test case input:
red blue
-1 1
red

Expected output:
-2 1


Actual output:
[-2, 1]


Fixed submission (verdict: Accepted):
ball = input().split()
number = list(map(int, input().split()))
U = input()

if U == ball[0]:
    number[0] -= 1
else:
    number[1] -= 1
print(number[0], number[1])

Problem: p02777
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
S,T=map(str,input().split())
A,B=map(int,input().split())
U=str(input())

if "S"=="U":
  print(A-1,B)
else:
  print(A,B-1)

Failing test case input:
red blue
2 -1
red

Expected output:
1 -1


Actual output:
2 -2


Fixed submission (verdict: Accepted):
S,T=input().split()
A,B=map(int,input().split())
U=input()

if S==U:
  print(A-1,B)
else:
  print(A,B-1)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = "red"
T = "blue"
A ,B = input().split()
U = str(input())
if(U == S):
   A = int(A) - 1
elif(U==T):
    B = int(B) -1
print(A, B)

Failing test case input:
red blue
10 1
red

Expected output:
9 1


Actual output:
red blue


Fixed submission (verdict: Accepted):
S, T = input().split()
A ,B = input().split()
U = str(input())
if(U == S):
   A = int(A) - 1
elif(U==T):
    B = int(B) -1
print(A, B)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S,T = input().split()
A,B = map(int, input().split())
U = input()

if S==U :
  print(str(A-1)+"　"+str(B))
elif T==U :
  print(str(A)+"　"+str(B-1))


Failing test case input:
red blue
0 1
red

Expected output:
-1 1


Actual output:
-1　1


Fixed submission (verdict: Accepted):
S,T = input().split()
A,B = map(int,input().split())
U=input()

if S==U:
	print(str(A-1)+" "+str(B))
elif T==U :
	print(str(A)+" "+str(B-1))
Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def resolve():
    S, T = input().split()
    A, B = map(int, input().split())
    U = input().split()
 
    if S == U:
        A -= 1
    else:
        B -= 1
 
    print(str(A) + " " + str(B))
 
if __name__ == "__main__":
    resolve()

Failing test case input:
red bkfu
8 0
red

Expected output:
7 0


Actual output:
8 -1


Fixed submission (verdict: Accepted):
def resolve():
    S, T = input().split()
    A, B = map(int, input().split())
    U = input()

    if S == U:
        A -= 1
    else:
        B -= 1
 
    print(str(A) + " " + str(B))
 
if __name__ == "__main__":
    resolve()

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S, T = input().split()
A, B = map(int, input().split())
U = input()

if S==U:
    print(A-1)
else:
    print(B-1)

Failing test case input:
red vkeb
9 -1
red

Expected output:
8 -1


Actual output:
8


Fixed submission (verdict: Accepted):
S, T = input().split()
A, B = map(int, input().split())
U = input()

if S==U:
    print(A-1,B)
else:
    print(A,B-1)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline
s,t = [i.rstrip() for i in readline().split()]
a,b = [int(i) for i in readline().split()]
u = readline()

if u == s:
    print(a-1, b)
else:
    print(a, b-1)

Failing test case input:
red blve
1 4
red

Expected output:
0 4


Actual output:
1 3


Fixed submission (verdict: Accepted):
import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline
s,t = [i.rstrip() for i in readline().split()]
a,b = [int(i) for i in readline().split()]
u = readline().rstrip()

if u == s:
    print(a-1, b)
else:
    print(a, b-1)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S, T = input().split()
A, B = input().split()
U = input()

print("{} {}".format(int(A) - 1 if S == U else 0, int(B) - 1 if T == U else 0))


Failing test case input:
red blue
3 2
red

Expected output:
2 2


Actual output:
2 0


Fixed submission (verdict: Accepted):
S, T = input().split()
A, B = input().split()
U = input()

print("{} {}".format(int(A) - (1 if S == U else 0), int(B) - (1 if T == U else 0)))

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S, T = input().split()
A, B = map(int, input().split())
U = input()
if U == S:    A -= 1
else: B -= 1
print(A)

Failing test case input:
red lbeu
7 3
red

Expected output:
6 3


Actual output:
6


Fixed submission (verdict: Accepted):
S, T = input().split()
A, B = map(int, input().split())
U = input()
if U == S:    A -= 1
else: B -= 1
print(A,B)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s, t = map(str, input().split())
a, b = map(int, input().split())
u = input()
if s == u:
    a -= 1
elif s == t:
    b -= 1
print(str(a) + ' '+  str(b))

Failing test case input:
red blue
5 5
blue

Expected output:
5 4

Actual output:
5 5


Fixed submission (verdict: Accepted):
s, t = map(str, input().split())
a, b = map(int, input().split())
u = input()
if s == u:
    a -= 1
elif t == u:
    b -= 1
print(str(a) + ' '+  str(b))
Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s, t = map(str, input().split())
a, b = map(int, input().split())
u = input()

if s == u:
    a -= 1
elif s == t:
    b -= 1
print(a, b)

Failing test case input:
red blue
5 5
blue

Expected output:
5 4

Actual output:
5 5


Fixed submission (verdict: Accepted):
s, t = map(str, input().split())
a, b = map(int, input().split())
u = input()

if s == u:
    a -= 1
elif t == u:
    b -= 1
print(a, b)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s, t = input().split()
a, b = map(int, input().split())
u=input()

if(u==s):
  print(a-1)
else:
 print(b-1)

Failing test case input:
red bkfu
4 0
red

Expected output:
3 0


Actual output:
3


Fixed submission (verdict: Accepted):
s, t = input().split()
a, b = map(int, input().split())
u=input()

if(u==s):
  print(str(a-1)+" "+str(b))
else:
 print(str(a)+" "+str(b-1))

Problem: p02777
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s,t,a,b,u=open(0).read().split()
if s==u:
    print(int(a)-1)
elif t==u:
    print(int(b)-1)

Failing test case input:
red blue
11 0
red

Expected output:
10 0


Actual output:
10


Fixed submission (verdict: Accepted):
s,t,a,b,u=open(0).read().split()
if s==u:
    print(int(a)-1,b)
elif t==u:
    print(a,int(b)-1)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def resolve():
    import sys
    input = sys.stdin.readline
    
    S, T = input().split()
    A, B = map(int, input().split())
    U = input()

    if U == S:
        print(A-1, B)
    else:
        print(A, B-1)


if __name__ == "__main__":
    resolve()

Failing test case input:
red blue
13 1
red

Expected output:
12 1


Actual output:
13 0


Fixed submission (verdict: Accepted):
def resolve():
    S, T = input().split()
    A, B = map(int, input().split())
    U = input()

    if U == S:
        print("{} {}".format(A-1, B))
    else:
        print("{} {}".format(A, B-1))


if __name__ == "__main__":
    resolve()

Problem: p02777
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
s, t = input().split()
a, b = map(int, input().split())
u = input()
if s == u:
  print(b)
else:
  print(a)

Failing test case input:
red blue
11 -3
red

Expected output:
10 -3


Actual output:
-3


Fixed submission (verdict: Accepted):
s, t = input().split()
a, b = map(int, input().split())
u = input()
if s == u:
  print(a-1, b)
else:
  print(a, b-1)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=input().split()
c,d=map(int,input().split())
print(c-1,d if input()==a else c,d-1)


Failing test case input:
red bule
-1 -2
red

Expected output:
-2 -2


Actual output:
-2 -2 -3


Fixed submission (verdict: Accepted):
a,b=input().split()
c,d=map(int,input().split())
if input()==a:
    print(c-1,d)
else:
    print(c,d-1)
Problem: p02777
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
S,T=map(str, input().split())
A,B=map(int, input().split())
U=str(input())
if 'r' in S:
    print(A-1,B)
elif 'b' in T:
      print(A,B-1)

Failing test case input:
red blue
5 5
blue

Expected output:
5 4

Actual output:
4 5


Fixed submission (verdict: Accepted):
S,T=map(str, input().split())
A,B=map(int, input().split())
U=str(input())
if S==U:
    print(A-1,B)
elif T==U:
      print(A,B-1)

Problem: p02777
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
s,t = input().split()
a,b = map(int, input().split())
u = input()
print(a-1,b if s==u else a,b-1)

Failing test case input:
red bule
-1 -2
red

Expected output:
-2 -2


Actual output:
-2 -2 -3


Fixed submission (verdict: Accepted):
s,t = input().split()
a,b = map(int, input().split())
u = input()
if s == u:
  a -= 1
else:
  b -= 1
print(a,b)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s, t= input().split(' ')
a, b = map(int,input().split(' '))
u = input()
print(a-1) if u == s else print(b-1)

Failing test case input:
red blue
3 7
red

Expected output:
2 7


Actual output:
2


Fixed submission (verdict: Accepted):
s, t= input().split(' ')
a, b = map(int,input().split(' '))
u = input()
print(a-1, b) if u == s else print(a, b-1)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
input = sys.stdin.readline

S, T = input().split()
A, B = map(int, input().split())
U = input()

if S==U:
  print(A-1,B)
else:
  print(A,B-1)


Failing test case input:
red bleu
12 -1
red

Expected output:
11 -1


Actual output:
12 -2


Fixed submission (verdict: Accepted):
S, T = input().split()
A, B = map(int, input().split())
U = input()

if S==U:
  print(A-1,B)
else:
  print(A,B-1)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s,t=(str,input().split())
a,b=(int,input().split())
u=str(input())

if s==u:
  print (a-1,b)
if t==u:
  print(a,b-1)

Failing test case input:
red bkfu
8 0
red

Expected output:
7 0


Actual output:

Fixed submission (verdict: Accepted):
s,t=input().split()
a,b=map(int,input().split())
u=input()

if s==u:
  print (a-1,b)
elif t==u:
  print(a,b-1)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
strings = input().split()
nums =  list(map(int, input().split(" ")))
delete = input()
for i in range(2):
    nums[i] = (nums[i] -1)  if strings[i] == delete else nums[i]
print(nums)

Failing test case input:
red etlb
4 4
red

Expected output:
3 4


Actual output:
[3, 4]


Fixed submission (verdict: Accepted):
strings = input().split()
nums =  list(map(int, input().split(" ")))
delete = input()
for i in range(2):
    nums[i] = (nums[i] -1)  if strings[i] == delete else nums[i]
print(*nums)
Problem: p02777
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N_dict  = {i:0 for i in list(map(str,input().split()))}
N_List = list(map(int,input().split()))
ct = 0
for i in N_dict.keys():
    N_dict[i] = N_List[0]
    ct += 1
print(N_dict[str(input())]-1)

Failing test case input:
red bkfu
26 0
red

Expected output:
25 0


Actual output:
25


Fixed submission (verdict: Accepted):
N_dict  = {i:0 for i in list(map(str,input().split()))}
N_List = list(map(int,input().split()))
ct = 0
for i in N_dict.keys():
    N_dict[i] = N_List[ct]
    ct += 1

N_dict[str(input())] -= 1
print(" ".join(list(map(str,N_dict.values()))))

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = list(map(str,input().split()))
b = list(map(int,input().split()))
c = input()

b[a.index(c)] -= 1

print(b)


Failing test case input:
red ufkb
22 0
red

Expected output:
21 0


Actual output:
[21, 0]


Fixed submission (verdict: Accepted):
a = list(map(str,input().split()))
b = list(map(int,input().split()))
c = input()

b[a.index(c)] -= 1

for i in range(len(b)):
	print(b[i],end=' ')

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s, t = input().split()
a, b = map(int, input().split())
u = input()
if u == s:
  a -= 1
if u == s:
  b -= 1
print(a, b)


Failing test case input:
red blve
1 4
red

Expected output:
0 4


Actual output:
0 3


Fixed submission (verdict: Accepted):
s, t = input().split()
a, b = map(int, input().split())
u = input()
if u == s:
  a -= 1
if u == t:
  b -= 1
print(a, b)

Problem: p02777
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b=input().split()
ST={}
ST[a], ST[b] = map(int, input().split())
ST[input()]-=1

for k,v in ST.items():
  print(v,end='')

Failing test case input:
red beul
4 1
red

Expected output:
3 1


Actual output:
31

Fixed submission (verdict: Accepted):
a,b=input().split()
ST={}
ST[a], ST[b] = map(int, input().split())
ST[input()]-=1

for k,v in ST.items():
  print(v,end=' ')

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from sys import stdin

S,T = stdin.readline().rstrip().split()
A,B = [int(x) for x in stdin.readline().rstrip().split()]
U = stdin.readline().rstrip().split()

if S==U:
	print(str(A-1)+" "+str(B))
else :
	print(str(A)+" "+str(B-1))

Failing test case input:
red blve
1 2
red

Expected output:
0 2


Actual output:
1 1


Fixed submission (verdict: Accepted):
from sys import stdin

S,T = stdin.readline().rstrip().split()
A,B = [int(x) for x in stdin.readline().rstrip().split()]
U = stdin.readline().rstrip().split()

if S==U[0]:
	print(str(A-1)+" "+str(B))
else :
	print(str(A)+" "+str(B-1))
Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S, T = input().split()
A, B = map(int, input().split())
U = input()
C = 0
if S == U:
    C = A - 1
elif T == U:
    C = B - 1
else:
	A = A

print(C)
print(S,T,A,B,U)

Failing test case input:
red lbte
0 3
red

Expected output:
-1 3


Actual output:
-1
red lbte 0 3 red


Fixed submission (verdict: Accepted):
S, T = input().split()
A, B = map(int, input().split())
U = input()
C = 0
D = 0
if S == U:
    C = A - 1
    D = B
elif T == U:
    D = B - 1
    C = A
else:
    A = A

print(C, D)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S, T = input().split()
A, B = map(int, input().split())
U = input().split()


if S == U:
    print(A-1, B)
else:
    print(A, B-1)

Failing test case input:
red blue
11 -2
red

Expected output:
10 -2


Actual output:
11 -3


Fixed submission (verdict: Accepted):
S, T = input().split()
A, B = map(int, input().split())
U = input()

if S == U:
    print(A-1, B)
else:
    print(A, B-1)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from sys import stdin

s, t = stdin.readline().rstrip().split()
a, b = [int(x) for x in stdin.readline().rstrip().split()]
u = stdin.readline().rstrip().split()

if (s == u):
    a -= 1
    
if (t == u):
    b -= 1


print(str(a) + " " + str(b))

Failing test case input:
red blue
11 0
red

Expected output:
10 0


Actual output:
11 0


Fixed submission (verdict: Accepted):
from sys import stdin

s, t = stdin.readline().rstrip().split()
a, b = [int(x) for x in stdin.readline().rstrip().split()]
u = stdin.readline().rstrip()

if (s == u):
    a -= 1
    
if (t == u):
    b -= 1

print(str(a) + " " + str(b))

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
tmp = input().split()
S = tmp[0]
T = tmp[1]
i = list(map(int, input().split()))
A = i[0]
B = i[1]
U = input()

if S == U:
  print(str(A-1) + " " + str(B))
else:
  print(str(B-1) + " " + str(A))



Failing test case input:
red blue
5 5
blue

Expected output:
5 4

Actual output:
4 5


Fixed submission (verdict: Accepted):
tmp = input().split()
S = tmp[0]
T = tmp[1]
i = list(map(int, input().split()))
A = i[0]
B = i[1]
U = input()

if S == U:
  print(str(A-1) + " " + str(B))
else:
  print(str(A) + " " + str(B-1))

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s, t =  input().split()
a, b = map(int, input().split())
u = input()

if s == u:
  a-=1
elif s==t:
  b -=1
print(a, b)

Failing test case input:
red blue
5 5
blue

Expected output:
5 4

Actual output:
5 5


Fixed submission (verdict: Accepted):
s, t =  input().split()
a, b = map(int, input().split())
u = input()

if s == u:
  a-=1
elif u==t:
  b -=1
print(a, b)
Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
color = input().split() 
count = list(map(int, input().split())) 
select_color = input() 

for i in range(0, 1):
    if select_color == color[i]:
        count[i] -= 1
print(count[0], count[1]) 

Failing test case input:
red blue
5 5
blue

Expected output:
5 4

Actual output:
5 5


Fixed submission (verdict: Accepted):
color = input().split() 
count = list(map(int, input().split())) 
select_color = input() 

for i in range(0, 2):
    if select_color == color[i]:
        count[i] -= 1
print(count[0], count[1])

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s, t = input().split()
a, b = map(int, input().split())
u = input().split()
if s == u:
  a -= 1
else:
  b -= 1
print(a, b)
  
  


Failing test case input:
red beul
4 2
red

Expected output:
3 2


Actual output:
4 1


Fixed submission (verdict: Accepted):
s, t = input().split()
a, b = map(int, input().split())
u = input()
if s == u:
  a -= 1
if t == u:
  b -= 1
print(a, b)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s, t = input().split()
a, b = map(int, input().split())
u = input()

if s == t:
    a -= 1
else:
    b -= 1

print(a, b)

Failing test case input:
red bleu
12 -1
red

Expected output:
11 -1


Actual output:
12 -2


Fixed submission (verdict: Accepted):
s, t = input().split()
a, b = map(int, input().split())
u = input()

if s == u:
    a -= 1
else:
    b -= 1

print(a, b)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s,t = input().split()
a,b = input().split()
u = input()

print(s)
print(u)
if u == s:
    print(int(a)-1,b)
else:
    print(a,int(b)-1)

Failing test case input:
red blue
5 0
red

Expected output:
4 0


Actual output:
red
red
4 0


Fixed submission (verdict: Accepted):
s,t = input().split()
a,b = input().split()
u = input()

if u == s:
    print(int(a)-1,b)
else:
    print(a,int(b)-1)

Problem: p02777
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S, T = input().split()
A, B = map(int, input().split())
U = input()
print((A-1, B) if S==U else (A, B-1))


Failing test case input:
red beul
6 2
red

Expected output:
5 2


Actual output:
(5, 2)


Fixed submission (verdict: Accepted):
S, T = input().split()
A, B = map(int, input().split())
U = input()
print(A-1, B) if S==U else print(A, B-1)
Problem: p00352
Buggy submission (Python3, verdict: Wrong Answer):
a,b=map(int,input().split())
print((a+b)/2)


Failing test case input:
428 5000

Expected output:
2714


Actual output:
2714.0


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
print((a+b)

Problem: p00352
Buggy submission (Python3, verdict: Wrong Answer):
print(sum(map(int,input().split()))/2)

Failing test case input:
1110 12073

Expected output:
6591


Actual output:
6591.5


Fixed submission (verdict: Accepted):
print(int(sum(map(int,input().split()))/2))

Problem: p00352
Buggy submission (Python3, verdict: Wrong Answer):


a, b = map(int, input().split())
print((a+b)/2)



Failing test case input:
0110 452

Expected output:
281


Actual output:
281.0


Fixed submission (verdict: Accepted):


a, b = map(int, input().split())
print((a+b)
Problem: p03672
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = list(input())
while S:
  del S[-2:]
  T = S[::-1]
  if T == S:
    print(len(T))
    exit()
  S = T[::-1]

Failing test case input:
bbbabbbacabc

Expected output:
8


Actual output:
2


Fixed submission (verdict: Accepted):
S = list(input())
while S:
  del S[-2:]
  T = S[len(S)
  if T == S[:len(S)
    print(len(S))
    break

Problem: p03672
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = list(input())
a = a[:-1]
flag = True

while(flag):
    b = set(a)
    flag = False
    for i in b:
        if a.count(i)%2!=0 :
            a = a[:-1]
            flag = True
            break

print(len(a))


Failing test case input:
bbacbacbaccb

Expected output:
2


Actual output:
8


Fixed submission (verdict: Accepted):
a = list(input())
flag = True

a = a[:-1]
while(flag):
    flag = False
    if len(a)%2!=0:
        a = a[:-1]
        flag = True
        continue
    if a[0:len(a)
            a = a[:-1]
            flag = True



print(len(a))

Problem: p03672
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
bbbabbbacabc

Expected output:
8


Actual output:
bbbabbbaca
bbbab
bbaca
8


Fixed submission (verdict: Accepted):
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(ans)

Problem: p03672
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

def main():
    msg = input()
    while len(msg) >= 2:
        before = msg[:int(len(msg) / 2)]
        after = msg[int(len(msg) / 2):]
        if before == after:
            print(len(before))
            break
        msg = msg[:-1]


if __name__ == '__main__':
    main()

Failing test case input:
bbaabcabcabc

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):

def main():
    msg = input()
    msg = msg[:-1]
    if len(msg) % 2 != 0:
        msg = msg[:-1]
    while len(msg) >= 2:
        before = msg[:int(len(msg) / 2)]
        after = msg[int(len(msg) / 2):]
        if before == after:
            print(len(msg))
            break
        msg = msg[:-2]


if __name__ == '__main__':
    main()

Problem: p03672
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = list(input())
if len(S)%2 != 0:
    S.remove(S[-1])
else:
    S.remove(S[-1])
    S.remove(S[-1])
while S[:int(len(S)/2)] != S[int(len(S)/2):]:
    S.remove(S[-1])
    S.remove(S[-1])
print(len(S))

Failing test case input:
aaakasaakks`kbs`kaak`s

Expected output:
2


Actual output:
0


Fixed submission (verdict: Accepted):
S = list(input())
if len(S)%2 != 0:
    del S[-1]
else:
    del S[-1]
    del S[-1]
while S[:int(len(S)/2)] != S[int(len(S)/2):]:
    del S[-1]
    del S[-1]
print(len(S))
Problem: p03672
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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))

Failing test case input:
bbabbccacabc

Expected output:
2


Actual output:
5


Fixed submission (verdict: Accepted):
s = input()
s = s[0:-1]
for i in range(len(s)):
    for j in range(len(s)
        if len(s)%2 ==1:
            s = s[0:-1]
            break
        elif s[j] != s[len(s)
            s= s[0:-1]
            break
print(len(s))

Problem: p03672
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
c=0
i=0
list1=[]
list2=[]


S = input('')
char_list = list(S)
c = len (char_list)
c= c-1
print(c)

while c>1:
	if c % 2 == 0:
		d=int(c/2)
		print (d)
		for i in range(d):
			list1.append(char_list[i]) 
			list2.append(char_list[i+d])
		print (list1)
		print(list2)

		if list1 == list2:
			print (len (list1))
			break

		list1=[]
		list2=[]
	c=c-1

Failing test case input:
bababcaacabc

Expected output:
4


Actual output:
11
5
['b', 'a', 'b', 'a', 'b']
['c', 'a', 'a', 'c', 'a']
4
['b', 'a', 'b', 'a']
['b', 'c', 'a', 'a']
3
['b', 'a', 'b']
['a', 'b', 'c']
2
['b', 'a']
['b', 'a']
2


Fixed submission (verdict: Accepted):
c=0
i=0
list1=[]
list2=[]


S = input('')
char_list = list(S)
c = len (char_list)
c= c-1


while c>1:
	if c % 2 == 0:
		d=int(c/2)
		
		for i in range(d):
			list1.append(char_list[i]) 
			list2.append(char_list[i+d])
		
		

		if list1 == list2:
			print (len (list1)*2)
			break

		list1=[]
		list2=[]
	c=c-1

Problem: p03672
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
letters = input()
print(letters)
while True:
    not_equal = 0
    length = len(letters)
    letters = letters[:length-1]
    print(letters)
    if len(letters) % 2 != 0:
        continue

    if int(len(letters)) % 2 == 0:
        half = int(len(letters)/2 -1)
    else:
        half = int((len(letters)-1)/2)
    i = 0
    while i <= half:
        if letters[i] != letters[i + half + 1]:
            not_equal = 1
            break
        i += 1

    if not_equal == 0:
        print(len(letters))
        break


Failing test case input:
bbbabcbacabc

Expected output:
2


Actual output:
bbbabcbacabc
bbbabcbacab
bbbabcbaca
bbbabcbac
bbbabcba
bbbabcb
bbbabc
bbbab
bbba
bbb
bb
2


Fixed submission (verdict: Accepted):
letters = input()
while True:
    not_equal = 0
    length = len(letters)
    letters = letters[:length-1]
    if len(letters) % 2 != 0:
        continue

    if int(len(letters)) % 2 == 0:
        half = int(len(letters)/2 -1)
    else:
        half = int((len(letters)-1)/2)
    i = 0
    while i <= half:
        if letters[i] != letters[i + half + 1]:
            not_equal = 1
            break
        i += 1

    if not_equal == 0:
        print(len(letters))
        break
Problem: p03672
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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
        


Failing test case input:
akakaraakas`kbs`kaakas

Expected output:
4


Actual output:

Fixed submission (verdict: Accepted):
S = input()
if len(S) % 2 == 1:
    S = S[:-1]
else:
    S = S[:-2]
while True:
    if S[0 : int(len(S) / 2)] == S[int(len(S) / 2) : len(S)]:
        print(len(S))
        break
    else:
        S = S[:-2]

Problem: p03672
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a=input()
if len(a)%2==1:a=a[:-1]
while int(a[0:int(len(a)/2)]==a[int((len(a)/2)):len(a)])==0:
  a=a[:-2]
print(len(a))

Failing test case input:
abcabcabcabc

Expected output:
6

Actual output:
12


Fixed submission (verdict: Accepted):
a=input()
if len(a)%2==1:a=a[:-1]
else:a=a[:-2]
while a[0:int(len(a)/2)]!=a[int((len(a)/2)):len(a)]:
  a=a[:-2]
print(len(a))

Problem: p03672
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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_))

Failing test case input:
aaaabacaab

Expected output:
4


Actual output:
4
2


Fixed submission (verdict: Accepted):
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_))
        break

Problem: p03672
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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]


Failing test case input:
bbabaacb`ccb

Expected output:
2


Actual output:
['b', 'b', 'a', 'b', 'a']
['a', 'c', 'b', '`', 'c', 'c']
['b', 'b', 'a', 'b', 'a']
['a', 'c', 'b', '`', 'c']
['b', 'b', 'a', 'b']
['a', 'a', 'c', 'b', '`']
['b', 'b', 'a', 'b']
['a', 'a', 'c', 'b']
['b', 'b', 'a']
['b', 'a', 'a', 'c']
['b', 'b', 'a']
['b', 'a', 'a']
['b', 'b']
['a', 'b', 'a']
['b', 'b']
['a', 'b']
['b']
['b', 'a']
['b']
['b']
2


Fixed submission (verdict: Accepted):
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:]
    if s1 == s2:
        print(s_half*2)
        break
    else:
        del s_list[-1]
Problem: p03672
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S=input()

buf=list(S)

result=0

for i in range(len(S)):
    del buf[-1]
    print(buf)
    if(len(buf)%2==0):
        tmp="".join(buf[0:int(len(buf)/2)])
        print(tmp)
        if "".join(buf).count(tmp)==2:
            result=len(buf)
            break

print(result)

Failing test case input:
yyyx

Expected output:
2


Actual output:
['y', 'y', 'y']
['y', 'y']
y
2


Fixed submission (verdict: Accepted):
S=input()

buf=list(S)

result=0

for i in range(len(S)):
    del buf[-1]
    if(len(buf)%2==0):
        tmp="".join(buf[0:int(len(buf)/2)])
        if "".join(buf).count(tmp)==2:
            result=len(buf)
            break

print(result)

Problem: p03672
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

S = input()

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


Failing test case input:
akasakaakasakasaka`kas

Expected output:
14


Actual output:
akasakaakasaka


Fixed submission (verdict: Accepted):

S = input()

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

Problem: p03672
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()

LengthS = len(S)
for i in range(3):
    LengthS = LengthS - 2
    HalfS = int(LengthS / 2)
    if S[:HalfS] == S[HalfS:LengthS]:
        print(LengthS)
        break


Failing test case input:
akasakaakasakasakb`kas

Expected output:
14


Actual output:

Fixed submission (verdict: Accepted):
S = input()

LengthS = len(S)
for i in range(100):
    LengthS = LengthS - 2
    HalfS = int(LengthS / 2)
    if S[:HalfS] == S[HalfS:LengthS]:
        print(LengthS)
        break

Problem: p03672
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S=input()

buf=list(S)

result=0

for i in S[-1::-1]:
    buf.remove(i)
    if(len(buf)%2==0):
        tmp="".join(buf[0:int(len(buf)/2)])
        if S.count(tmp)==2 or len(tmp) == 1:
            result=len(buf)
            break

print(result)

Failing test case input:
akakasaakasakbs`kaakas

Expected output:
4


Actual output:
8


Fixed submission (verdict: Accepted):
S=input()

buf=list(S)

result=0

for i in range(len(S)):
    del buf[-1]
    if(len(buf)%2==0):
        tmp="".join(buf[0:int(len(buf)/2)])
        if "".join(buf).count(tmp)==2:
            result=len(buf)
            break

print(result)

Problem: p03672
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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

Failing test case input:
bbbabbbacabc

Expected output:
8


Actual output:
8
2


Fixed submission (verdict: Accepted):
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)
            break
        else:
            continue
Problem: p03672
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = list(input())
y = list()

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

Failing test case input:
bbbbbbbad`bc

Expected output:
6


Actual output:
6
4
2


Fixed submission (verdict: Accepted):
s = list(input())
y = list()

for i in range(2, len(s), 2):
	y = s[:-i]
	h = int(len(s[:-i]) 
	if y[:h] == y[h:]:
		print(len(y))
		exit()

Problem: p03672
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = str(input())
l = [str(x) for x in list(str(S))]
for i in range(int(len(l)/2)):
    l.pop(-1)
    if len(l) % 2 == 0:
        tmp = "".join(l)
        if tmp[:int(len(l)/2)] == tmp[int(len(l)/2):]:
            print(len(l))
            break
        else:
            continue
    elif len(l) == 1:
        print(0)
    else:
        continue

Failing test case input:
aaakasaakkt`kbsakaak`s

Expected output:
2


Actual output:

Fixed submission (verdict: Accepted):
S = str(input())
l = [str(x) for x in list(str(S))]
for i in range(int(len(l)/2)):
    l.pop(-1)
    l.pop(-1)
    tmp = "".join(l)
    if tmp[:int(len(l)/2)] == tmp[int(len(l)/2):]:
        print(len(l))
        break
    else:
        continue

Problem: p03672
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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

Failing test case input:
bbacbacbaccb

Expected output:
2


Actual output:

Fixed submission (verdict: Accepted):
s = list(input())
b = [None]*len(s)
for i in range(len(b)):
  s.pop()
  if len(s) % 2 == 0:
    a = int(len(s) / 2)
    if s[:a] == s[a:]:
      print(len(s))
      break
    else:
      continue
  else:
    continue

Problem: p03672
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
if len(S) % 2 == 1:
    S = S[:-1]
else:
    S = S[:-2]
N = len(S) 
print(S[:N], S[N:2*N])
while S[:N] != S[N:2*N]:
    N -= 1
print(2*N)

Failing test case input:
abcabcaacabc

Expected output:
6


Actual output:
abcabcaaca 
6


Fixed submission (verdict: Accepted):
S = input()
if len(S) % 2 == 1:
    S = S[:-1]
else:
    S = S[:-2]
N = len(S) 
while S[:N] != S[N:2*N]:
    N -= 1
print(2*N)

Problem: p03672
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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

Failing test case input:
asasaaaakks`kbk`kaakas

Expected output:
4


Actual output:
10


Fixed submission (verdict: Accepted):
S=list(input())


import sys
for i in range(len(S)):
    del S[-1]
    for j in range(len(S)):
        if len(S)%2==0:
            if S[0:len(S)
                print(len(S))
                sys.exit()
else:
    print(0)
Problem: p03672
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
s = list(input())

def check(L):
    if len(L)%2 != 0:
        return False
    
    n = int(len(L)/2)
    if L[:n] == L[n:]:
        
        return True




for i in range(1,len(s)):
    m = len(s) - i
    if check(s[0:m]):
        print(m)

Failing test case input:
bbbbbbbadabc

Expected output:
6


Actual output:
6
4
2


Fixed submission (verdict: Accepted):
s = list(input())


def check(L):
    if len(L)%2 != 0:
        return False
    
    n = int(len(L)/2)
    if L[:n] == L[n:]:
        
        return True





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

Problem: p03672
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
stdin = sys.stdin

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

from collections import Counter

s = lc()

ans = 0
cnt = Counter([])
for i, si in enumerate(s[:-1]):
    allEven = True
    cnt[si] += 1
    
    for cnti in cnt.values():
        if cnti%2 == 1:
            allEven = False
            
    if allEven:
        ans = i+1
        
print(ans)

Failing test case input:
abcabcaacabc

Expected output:
6


Actual output:
8


Fixed submission (verdict: Accepted):
import sys
stdin = sys.stdin

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

s = ns()

ans = 0
for n in range(len(s)
    if s[:n] == s[n:2*n]:
        ans = n
        break
        
print(2*ans)
Problem: p03672
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def hantei(list_str,n):
    k = int(n/2)
    if list_str[0:k] == list_str[k:n]:
        return n
    else:
        return 0
S = list(input())
length = len(S)
flag = 0
if length == 2:
    print(0)
    flag = 1
elif length == 3:
    length -= 1
    ans = hantei(S,2)
    print(ans)
    flag = 1
elif length % 2 == 1:
    length -= 1
    ans = 0
else:
    length -= 2
    ans = 0
while length < 2:
        ans = hantei(S,length)
        if ans != 0:
            break
        length -= 2

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


Failing test case input:
aaaaaacabb

Expected output:
6


Actual output:
1


Fixed submission (verdict: Accepted):
def hantei(list_str,n):
    k = int(n/2)
    if list_str[0:k] == list_str[k:n]:
        return n
    else:
        return 0
S = list(input())
length = len(S)
flag = 0
if length == 2:
    print(0)
    flag = 1
elif length == 3:
    length -= 1
    ans = hantei(S,2)
    print(ans)
    flag = 1
elif length % 2 == 1:
    length -= 1
    ans = 0
else:
    length -= 2
    ans = 0
while length >= 2:
        ans = hantei(S,length)
        if ans != 0:
            break
        length -= 2

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

Problem: p03672
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = str(input())
for i in range(len(s)):
    s = s[:-1]
    print(s)
    if len(s) % 2 == 0:
        flag = 0
        for j in range(int(len(s)/2)):
            if s[j] == s[j+int((len(s)/2))]:
                flag += 1
        if flag == (int(len(s)/2)):
            print(len(s))
            break

Failing test case input:
bbadcacbabbb

Expected output:
2


Actual output:
bbadcacbabb
bbadcacbab
bbadcacba
bbadcacb
bbadcac
bbadca
bbadc
bbad
bba
bb
2


Fixed submission (verdict: Accepted):
s = str(input())
for i in range(len(s)):
    s = s[:-1]
    if len(s) % 2 == 0:
        flag = 0
        for j in range(int(len(s)/2)):
            if s[j] == s[j+int((len(s)/2))]:
                flag += 1
        if flag == (int(len(s)/2)):
            print(len(s))
            break

Problem: p03672
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
n = len(s)
s = s[:-2]
for _ in range(n):
  n = len(s)
  m = int(n/2)
  if s[:m] == s[m:]:
    print(s)
    break
  else:
    s = s[:-2]

Failing test case input:
aaakasaakks`kbsakaak`s

Expected output:
2


Actual output:
aa


Fixed submission (verdict: Accepted):
s = input()
n = len(s)
s = s[:-2]
for _ in range(n):
  n = len(s)
  m = int(n/2)
  if s[:m] == s[m:]:
    print(len(s))
    break
  else:
    s = s[:-2]

Problem: p03672
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

S = input()

for i in range(len(S)):
    if S[:i] + S[:i] == S[:2 * i]:
        ans = i

print(2 * ans)

Failing test case input:
akasakaakasakasakaakas

Expected output:
14

Actual output:
22


Fixed submission (verdict: Accepted):

S = input()

for i in range(len(S) 
    if S[:i] + S[:i] == S[:2 * i]:
        ans = i

print(2 * ans)
Problem: p03672
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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


Failing test case input:
aaaabacaab

Expected output:
4


Actual output:
4
2


Fixed submission (verdict: Accepted):
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)
            break
        else:
            continue

Problem: p03672
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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

Failing test case input:
aacbbcabaaac

Expected output:
2


Actual output:
6


Fixed submission (verdict: Accepted):
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 len(t)%2==0:
        if t[:len(t)
            print(len(t))
            break

Problem: p03672
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
aaakasaakkt`kbsakaak`s

Expected output:
2


Actual output:
`kbsakaak`s
aaakasaakkt
aaakasaakkt`kbsakaak`
t`kbsakaak`
aaakasaakk
aaakasaakkt`kbsakaak
t`kbsakaak
aaakasaakk
aaakasaakkt`kbsakaa
kt`kbsakaa
aaakasaak
aaakasaakkt`kbsaka
kt`kbsaka
aaakasaak
aaakasaakkt`kbsak
kkt`kbsak
aaakasaa
aaakasaakkt`kbsa
kkt`kbsa
aaakasaa
aaakasaakkt`kbs
akkt`kbs
aaakasa
aaakasaakkt`kb
akkt`kb
aaakasa
aaakasaakkt`k
aakkt`k
aaakas
aaakasaakkt`
aakkt`
aaakas
aaakasaakkt
saakkt
aaaka
aaakasaakk
saakk
aaaka
aaakasaak
asaak
aaak
aaakasaa
asaa
aaak
aaakasa
kasa
aaa
aaakas
kas
aaa
aaaka
aka
aa
aaak
ak
aa
aaa
aa
a
aa
a
a
2


Fixed submission (verdict: Accepted):
hoge=input()

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

Problem: p03672
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
for i in range(1, len(s)):
    if s[:i] == s[i:2*i]:
        print(i*2)
        break


Failing test case input:
bbbabbbacabc

Expected output:
8


Actual output:
2


Fixed submission (verdict: Accepted):
s = input()
for i in range(len(s)
    if s[:i] == s[i:2*i]:
        print(2*i)
        break
Problem: p03672
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
s = input()
s = list(s)

ans = []

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

Failing test case input:
akakskaakakas`saaaakas

Expected output:
4


Actual output:
3


Fixed submission (verdict: Accepted):
s = input()
s = list(s)

ans = []

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

Problem: p03672
Buggy submission (Python (3.4.3), verdict: Wrong Answer):



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


Failing test case input:
bbabbacb`ccb

Expected output:
6


Actual output:
2


Fixed submission (verdict: Accepted):



import sys
input = sys.stdin.readline


def main():
    s = str(input()).replace("\n", "")

    for i in range(len(s) - 2, 0, -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()

Problem: p03672
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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])
  
  


Failing test case input:
bbcacbaababc

Expected output:
2


Actual output:

Fixed submission (verdict: Accepted):
s=list(input())
from copy import copy
t=s.copy()

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

Problem: p03672
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

s = input()
n = len(s)
count = 0   

if n % 2 == 1:
    count += 1

while s[0 : int((n-count)/2)] != s[int((n-count)/2) : n-count]:
    count += 2

print(n-count)


Failing test case input:
akasakaakasakasakaakas

Expected output:
14

Actual output:
22


Fixed submission (verdict: Accepted):

s = input()
n = len(s)
count = 1   
 
if n % 2 == 1 - count:
    count += 1
 
while s[0 : int((n-count)/2)] != s[int((n-count)/2) : n-count]:
    count += 2
 
print(n-count)
Problem: p03672
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
for i in range(len(s)):
    str = s[:-i]
    str_half_length = int(len(str) / 2)
    str_1 = str[str_half_length:]
    str_2 = str[:str_half_length]
    if str_1 == str_2 and i != 0:
        print(str_half_length * 2)


Failing test case input:
bbbbbbbad`bc

Expected output:
6


Actual output:
6
4
2


Fixed submission (verdict: Accepted):
s = input()
for i in range(len(s)):
    str = s[:-(i+1)]
    str_half_length = int(len(str) / 2)
    str_1 = str[str_half_length:]
    str_2 = str[:str_half_length]
    if str_1 == str_2:
        print(str_half_length * 2)
        exit()

Problem: p03672
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
if __name__ == "__main__":
    s = input()
    data = list(s)
    while len(data):
        data.pop()
        if len(data) % 2 == 0:
            half = int(len(data) / 2)
            if data[:half] == data[half:]:
                print("".join(data[:half]))
                break

Failing test case input:
bba`bccacabb

Expected output:
2


Actual output:
b


Fixed submission (verdict: Accepted):
if __name__ == "__main__":
    s = input()
    data = list(s)
    while len(data):
        data.pop()
        if len(data) % 2 == 0:
            half = int(len(data) / 2)
            if data[:half] == data[half:]:
                print(len(data))
                break

Problem: p03672
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
ans = 0
s = input()
for i in range(len(s)):
    if i % 2 != 0:
        continue
    if s[:i] == s[i:]:
        ans = i
print(ans)

Failing test case input:
aacbbcabaaac

Expected output:
2


Actual output:
0


Fixed submission (verdict: Accepted):
ans = 0
s = input()
for i in range(1,len(s)):
    if i % 2 != 0:
        continue
    k = s[:i]
    a = int(len(k)/2)
    if k[a:] == k[:a]:
        ans = i
print(ans)

Problem: p03672
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
st=input()
num=len(st)

for x in range(1,num+1):
    st=st.rstrip(st[-1:])
    num=len(st)
    if num%2==0:
        p=int(num/2)
        st1=st[:p]
        st2=st[-p:]
        if st1==st2:
            print(len(st))
            break
        else:
            continue
    else:
        continue


Failing test case input:
yyyw

Expected output:
2


Actual output:
0


Fixed submission (verdict: Accepted):
st=input()
num=len(st)
for x in range(1,num+1):
    st = list(st)
    del st[-1:]
    st = "".join(st)
    n=len(st)
    if n%2==0:
        p=int(n/2)
        st1=st[:p]
        st2=st[-p:]
        if st1==st2:
            print(len(st))
            break
        else:
            continue
    else:
        continue