ZhenlongDai/ACPR huggingface dataset:
Problem: p03723
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, C = list(map(int, input().split()))

pattern = list()
i = 0
while True:
    if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:
        print(i)
        break
    if (A, B, C) in pattern:
        print(-1)
        break
    tmp_A = A
    tmp_B = B
    A = (B + C) / 2
    B = (C + tmp_A) / 2
    C = (tmp_B + tmp_A) / 2

    i += 1

    pattern.append((A, B, C))



Failing test case input:
1076 32 2408

Expected output:
2


Actual output:
-1


Fixed submission (verdict: Accepted):
A, B, C = list(map(int, input().split()))

pattern = list()
i = 0
while True:
    if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:
        print(i)
        break
    tmp_A = A
    tmp_B = B
    A = (B + C) / 2
    B = (C + tmp_A) / 2
    C = (tmp_B + tmp_A) / 2

    i += 1

    if (A, B, C) in pattern:
        print(-1)
        break
    pattern.append((A, B, C))

Problem: p03723
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, C = (int(i) for i in input().split()) 


result = 0
memory = [[A, B, C]]
while True:
    result += 1
    
    a = A / 2
    b = B / 2
    c = C / 2

    A = b + c
    B = a + c
    C = a + b

    l = sorted([A, B, C])
    for m in memory:
        if m[0] == l[0] and m[1] == l[1] and m[2] == l[2]:
            result = -1
            break
    
    if result == -1:
        break



    if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:
        break

    memory.append(l)
    

print(result)




Failing test case input:
2680 18 6815

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
A, B, C = (int(i) for i in input().split()) 






result = 0
memory = [[A, B, C]]
while True:
    if A % 2 != 0 or B % 2 != 0 or C % 2 != 0:
        break
    else:
        result += 1
    
    a = A / 2
    b = B / 2
    c = C / 2

    A = b + c
    B = a + c
    C = a + b

    l = sorted([A, B, C])
    for m in memory:
        if m[0] == l[0] and m[1] == l[1] and m[2] == l[2]:
            result = -1
            break
    
    if result == -1:
        break

	

    

    memory.append(l)
    

print(result)

Problem: p03723
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b,c=map(int,input().split())

if a==b==c and a%2==0:
    print(-1)
else:
    num=0
    while True:
        if a%2==1 or b%2==1 or c%2==1:
            break
        num+=1
        l0=(b+c)/2
        l1=(c+a)/2
        l2=(a+b)/2
        a,b,c=l0,l1,l2
    else:
        print(num)

Failing test case input:
608 20 6797

Expected output:
0


Actual output:

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

if a==b==c and a%2==0:
    print(-1)
else:
    num=0
    while True:
        if a%2==1 or b%2==1 or c%2==1:
            break
        num+=1
        l0=(b+c)/2
        l1=(c+a)/2
        l2=(a+b)/2
        a,b,c=l0,l1,l2
    print(num)
Problem: p03723
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c=map(int,input().split())
cnt=0
if a==b==c or a%2==b%2==c%2==1:
  print(-1)
  exit()
while a%2==b%2==c%2==0:
  a,b,c=(b+c)/2,(a+c)/2,(a+b)/2
  cnt+=1
print(cnt)


Failing test case input:
15 25 13

Expected output:
0


Actual output:
-1


Fixed submission (verdict: Accepted):
a,b,c=map(int,input().split())
cnt=0
if any((a%2==1,b%2==1,c%2==1)):
  print(0)
  exit()
if a==b==c and a%2==0:
  print(-1)
  exit()
while a%2==b%2==c%2==0:
  a,b,c=(b+c)/2,(a+c)/2,(a+b)/2
  cnt+=1
print(cnt)

Problem: p03723
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, C = list(map(int, input().split()))

pattern = list()
i = 0
while True:
    tmp_A = A
    tmp_B = B
    A = (B + C) / 2
    B = (C + tmp_A) / 2
    C = (tmp_B + tmp_A) / 2

    i += 1

    if (A, B, C) in pattern:
        print(0)
        break
    if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:
        print(i)
        break

    pattern.append((A, B, C))



Failing test case input:
1 25 5

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
A, B, C = list(map(int, input().split()))

pattern = list()
i = 0
while True:
    if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:
        print(i)
        break
    tmp_A = A
    tmp_B = B
    A = (B + C) / 2
    B = (C + tmp_A) / 2
    C = (tmp_B + tmp_A) / 2

    i += 1

    if (A, B, C) in pattern:
        print(-1)
        break
    pattern.append((A, B, C))

Problem: p03723
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, C = (int(i) for i in input().split()) 


result = 0
memory = []
while True:
    memory.append(sorted([A, B, C]))

    a = A / 2
    b = B / 2
    c = C / 2

    A = b + c
    B = a + c
    C = a + b


    for m in memory:
        l = sorted([A, B, C])
        if m[0] == l[0] and m[1] == l[1] and m[2] == l[2]:
            result = -1
    
    if result == -1:
        break



    if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:
        break

    

print(result)




Failing test case input:
454 414 1200

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
A, B, C = (int(i) for i in input().split()) 






result = 0
memory = [[A, B, C]]
while True:
    if A % 2 != 0 or B % 2 != 0 or C % 2 != 0:
        break
    else:
        result += 1
    
    a = A / 2
    b = B / 2
    c = C / 2

    A = b + c
    B = a + c
    C = a + b

    l = sorted([A, B, C])
    for m in memory:
        if m[0] == l[0] and m[1] == l[1] and m[2] == l[2]:
            result = -1
            break
    
    if result == -1:
        break

	

    

    memory.append(l)
    

print(result)
Problem: p03723
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c=map(int,input().split())
cnt=1
while True:
 aa=a
 bb=b
 cc=c
 a=(bb+cc)/2
 b=(cc+aa)/2
 c=(aa+bb)/2
 if a%2==1 or b%2==1 or c%2==1:
  print(cnt)
  exit()
 elif a==b==c:
  print(-1)
  exit()
 else:
  cnt+=1

Failing test case input:
1614 27 7744

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
a,b,c=map(int,input().split())
if a%2==1 or b%2==1 or c%2==1:
 print(0)
 exit()
cnt=1
while True:
 aa=a
 bb=b
 cc=c
 a=(bb+cc)/2
 b=(cc+aa)/2
 c=(aa+bb)/2
 if a%2==1 or b%2==1 or c%2==1:
  print(cnt)
  exit()
 elif a==b==c:
  print(-1)
  exit()
 else:
  cnt+=1

Problem: p03723
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c = map(int,input().split())
cnt = 0
while cnt <= 100:
    
    a,b,c = (b+c)/2, (a+c)/2,(a+b)/2
    cnt += 1
    if any((a%1!=0,b%1!=0,c%1!=0)):
        print(cnt-1)
        exit()
print(-1)

Failing test case input:
-5 -1 -3

Expected output:
0


Actual output:
1


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

if any((a%2==1,b%2==1,c%2==1)):
    print(0)
    exit()
    
cnt = 0
while cnt <= 100:
    a,b,c = (b+c)/2, (a+c)/2,(a+b)/2
    cnt += 1
    if any((a%1!=0,b%1!=0,c%1!=0)):
        print(cnt-1)
        exit()
print(-1)

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


if a % 2 == 0 or b % 2 == 0 or c % 2 == 0:
    print(0)
    exit(0)
if a == b == c and a % 2 == 0:
    print(-1)
    exit(0)

counter = 0
while True:
    counter += 1
    w_a = a / 2
    w_b = b / 2
    w_c = c / 2

    a = w_b + w_c
    b = w_a + w_c
    c = w_b + w_a

    if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
        print(counter)
        exit(0)


Failing test case input:
1390 94 1200

Expected output:
1


Actual output:
0


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


if a % 2 != 0 or b % 2 != 0 or c % 2 != 0:
    print(0)
    exit(0)
if a == b == c and a % 2 == 0:
    print(-1)
    exit(0)

counter = 0
while True:
    counter += 1
    w_a = a / 2
    w_b = b / 2
    w_c = c / 2

    a = w_b + w_c
    b = w_a + w_c
    c = w_b + w_a

    if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
        print(counter)
        exit(0)

Problem: p03723
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b,c=map(int,input().split())

ans=0
if a==b==c:
  print(-1)
else:
  while a%2==0 and b%2==0 and c%2==0:
    num_a,num_b,num_c=a/2,b/2,c/2
    a=num_b+num_c
    b=num_a+num_c
    c=num_a+num_b
    ans+=1
  
print(ans)

Failing test case input:
14 14 14

Expected output:
-1

Actual output:
-1
0


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

if a%2!=0 or b%2!=0 or c%2!=0:
  print(0)
  exit()
elif a==b==c:
  print(-1)
  exit()
    
ans=0  

while a%2==0 and b%2==0 and c%2==0:
  num_a,num_b,num_c=a/2,b/2,c/2
  a=num_b+num_c
  b=num_a+num_c
  c=num_a+num_b
  ans+=1
print(ans)
Problem: p03723
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
A,B,C=map(int,input().split())

a=0

D=set()
D.add((A,B,C))
while True:
    p=(B+C)/2
    q=(A+C)/2
    r=(A+B)/2
    a+=1
    if p%2!=0 or q%2!=0 or r%2!=0:
        break
    if (p,q,r) in D:
        a=-1
        break
    else:
        D.add((p,q,r))
    A=p;B=q;C=r
print(a)

Failing test case input:
-5 0 -3

Expected output:
0


Actual output:
1


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

a=0
D=set()
while True:
    if A%2!=0 or B%2!=0 or C%2!=0:
        break
    if (A,B,C) in D:
        a=-1
        break
    else:
        D.add((A,B,C))
    p=(B+C)/2
    q=(A+C)/2
    r=(A+B)/2
    A=p;B=q;C=r
    a+=1
print(a)

Problem: p03723
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
X=[int(x) for x in input().split()]
count=0
if ((X[0]%2-1)*(X[1]%2-1)*(X[2]%2-1)!=0 and X[0]==X[1] and X[1]==X[2]):
  count=-1
else:
  while((X[0]%2-1)*(X[1]%2-1)*(X[2]%2-1)!=0):
    X[0]=(X[1]+X[2])/2
    X[1]=(X[0]+X[2])/2
    X[2]=(X[1]+X[0])/2
    count =count+1
print(count) 

Failing test case input:
4 12 20

Expected output:
3

Actual output:
1


Fixed submission (verdict: Accepted):
X=[int(x) for x in input().split()]
count=0
if ((X[0]%2-1)*(X[1]%2-1)*(X[2]%2-1)!=0 and X[0]==X[1] and X[1]==X[2]):
  count=-1
else:
  while((X[0]%2-1)*(X[1]%2-1)*(X[2]%2-1)!=0):
    Y=[0,0,0]
    Y[0]=(X[1]+X[2])/2
    Y[1]=(X[0]+X[2])/2
    Y[2]=(X[1]+X[0])/2
    X=Y
    count =count+1
print(count)

Problem: p03723
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
A, B, C = map(int, input().split())
count = 0
ABC = []
while True:
    if A % 2 ==0 and B % 2 == 0 and C % 2 == 0:
        nA = B/2 + C/2
        nB = A/2 + C/2
        nC = A/2 + B/2
        A, B, C = nA, nB, nC
        ABC.append([A, B, C])
        count += 1
        if [A, B, C] in ABC:
            count = -1
            break
    else:
        break
print(count)

Failing test case input:
1924 106 784

Expected output:
1


Actual output:
-1


Fixed submission (verdict: Accepted):
A, B, C = map(int, input().split())
count = 0
ABC = []
while True:
    if A % 2 ==0 and B % 2 == 0 and C % 2 == 0:
        nA = B/2 + C/2
        nB = A/2 + C/2
        nC = A/2 + B/2
        A, B, C = nA, nB, nC
        count += 1
        if [A, B, C] in ABC:
            count = -1
            break
        ABC.append([A, B, C])
    else:
        break
print(count)
Problem: p03723
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
    A, B, C = map(int, input().split())

    a = A
    b = B
    c = C
    i = 0
    while True:
        if (b + c) % 2 > 0 or (a + c) % 2 > 0 or (a + b) % 2 > 0:
            break
        elif A == B == C:
            i = -1
            break
        else:
            now_a = (b + c) / 2
            now_b = (a + c) / 2
            now_c = (a + b) / 2
            a = now_a
            b = now_b
            c = now_c
            i += 1
    print(i)

main()


Failing test case input:
1 25 5

Expected output:
0


Actual output:
2


Fixed submission (verdict: Accepted):
def main():
    A, B, C = map(int, input().split())

    a = A
    b = B
    c = C
    i = 0
    while True:
        if a % 2 > 0 or b % 2 > 0 or c % 2 > 0:
            break
        elif A == B == C:
            i = -1
            break
        else:
            now_a = (b + c) / 2
            now_b = (a + c) / 2
            now_c = (a + b) / 2
            a = now_a
            b = now_b
            c = now_c
            i += 1
    print(i)

main()

Problem: p03723
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
cookie = list(map(int,input().split()))
odd = False
cnt = 0
if len(list(set(cookie))) == 1 and cookie[0]%2==0:
    print('-1')
else:
    while not odd:
        tmp = [0 for i in range(3)]
        for i in range(3):
            ix = list(set([0,1,2]) - set([i]))
            tmp[ix[0]] += cookie[i] / 2
            tmp[ix[1]] += cookie[i] / 2
        for i in tmp:
            if not i % 2 == 0:
                odd = True
        cookie = tmp
        cnt += 1
    print(cnt)

Failing test case input:
608 27 6797

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
cookie = list(map(int,input().split()))
odd = False
cnt = 0
if cookie[0]%2==1 or cookie[1]%2== 1 or cookie[2]%2==1:
    print(0)
elif len(list(set(cookie))) == 1:
    print('-1')
else:
    while not odd:
        tmp = [0 for i in range(3)]
        for i in range(3):
            ix = list(set([0,1,2]) - set([i]))
            tmp[ix[0]] += cookie[i] / 2
            tmp[ix[1]] += cookie[i] / 2
        for i in tmp:
            if not i % 2 == 0:
                odd = True
        cookie = tmp
        cnt += 1
    print(cnt)

Problem: p03723
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c = map(int, input().split())
ans = 0
if (a/2)%2 and (b/2)%2 and (c/2)%2:
  print(-1)
else:
  while (a%2 or b%2 or c%2) == 0 :
    tmp1 = a
    tmp2 = b
    a = b/2 + c/2
    b = tmp1/2 + c/2
    c = tmp1/2 + tmp2/2
    ans += 1
  print(ans)

Failing test case input:
1390 213 2625

Expected output:
0


Actual output:
-1


Fixed submission (verdict: Accepted):
a, b, c = map(int, input().split())
ans = 0
if a == b == c and a%2 == 0:
  print(-1)
else:
  while (a%2 or b%2 or c%2) == 0 :
    tmp1 = a
    tmp2 = b
    a = b/2 + c/2
    b = tmp1/2 + c/2
    c = tmp1/2 + tmp2/2
    ans += 1
  print(ans)
Problem: p03723
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b,c=map(int,input().split())

ans=0
if a==b==c:
  print(-1)
else:
  while a%2==0 and b%2==0 and c%2==0:
    num_a,num_b,num_c=a/2,b/2,c/2
    a=num_b+num_c
    b=num_a+num_c
    c=num_a+num_b
    print(a,b,c)
    ans+=1
  print(ans)

Failing test case input:
454 414 444

Expected output:
1

Actual output:
429.0 449.0 434.0
1


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

if a%2!=0 or b%2!=0 or c%2!=0:
  print(0)
  exit()
elif a==b==c:
  print(-1)
  exit()
    
ans=0  

while a%2==0 and b%2==0 and c%2==0:
  num_a,num_b,num_c=a/2,b/2,c/2
  a=num_b+num_c
  b=num_a+num_c
  c=num_a+num_b
  ans+=1
print(ans)

Problem: p03723
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c = input().split()
a = float(a)
b = float(b)
c = float(c)
cnt = 0
while a != b and b != c:
    ta = b / 2 + c / 2
    tb = a / 2 + c / 2
    tc = a / 2 + b / 2
    a = ta
    b = tb
    c = tc
    cnt += 1
    
    if int(a) % 2 or int(b) % 2 or int(c) % 2:
        break
if cnt == 0:
    cnt = -1
print (cnt)

Failing test case input:
1390 213 2625

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
a, b, c = input().split()
a = int(a)
b = int(b)
c = int(c)
cnt = 0
while True:
    if a % 2 or b % 2 or c % 2:
        break;
    if a == b and b == c:
        cnt = -1;
        break
    ta = b / 2 + c / 2
    tb = a / 2 + c / 2
    tc = a / 2 + b / 2
    a = ta
    b = tb
    c = tc
    cnt += 1
print (cnt)

Problem: p03723
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
    a, b, c = map(int, input().split())
    count = 0
    while (a | b | c) & 1 == 0:
        if a==b==c:
            print(-1)
            return
        a, b, c = (b + c) >> 1, (c + a) >> 1, (a + b) >> 1
        count += 1
        print(a,b,c)
    
    print(count)

main()


Failing test case input:
4 12 20

Expected output:
3

Actual output:
16 12 8
10 12 14
13 12 11
3


Fixed submission (verdict: Accepted):
def main():
    a, b, c = map(int, input().split())
    if a == b == c:
        print(0 if a & 1 else -1)
        return
    count = 0
    while (a | b | c) & 1 == 0:
        a, b, c = (b + c) >> 1, (c + a) >> 1, (a + b) >> 1
        count += 1
    
    print(count)
 
main()
Problem: p03723
Buggy submission (Python (3.8.2), verdict: Wrong Answer):


A, B, C = map(int, input().split())
a, b, c = A, B, C
i = 0
while True:
    if (A % 2 == 0 and B % 2 == 0 and C % 2 == 0):
        i += 1
        a, b, c = A, B, C
        A = (b+c)/2
        B = (c+a)/2
        C = (a+b)/2
        print(A,B,C)
        if(A == a or B == b or C == c):
            print(-1)
            break
    else:
        if(A == a or B == b or C == c):
            print(-1)
            break
        print(i)
        break


Failing test case input:
-10 -2 -4

Expected output:
1


Actual output:
-3.0 -7.0 -6.0
1


Fixed submission (verdict: Accepted):


A, B, C = map(int, input().split())
a, b, c = A, B, C
i = 0
while True:
    if (A % 2 == 0 and B % 2 == 0 and C % 2 == 0):
        i += 1
        a, b, c = A, B, C
        A = (b+c)/2
        B = (c+a)/2
        C = (a+b)/2
 
        if(A == a and B == b and C == c):
            print(-1)
            break
    else:
        print(i)
        break
        if(A == a and B == b and C == c):
            print(-1)
            break

Problem: p03723
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b,c=map(int,input().split())

ans=0
if a==b==c:
  if a%2==0:
    print(0)
    exit()
  else:
    print(-1)
    exit()
while a%2==0 and b%2==0 and c%2==0:
  num_a,num_b,num_c=a/2,b/2,c/2
  a=num_b+num_c
  b=num_a+num_c
  c=num_a+num_b
  ans+=1
print(ans)


Failing test case input:
14 14 14

Expected output:
-1

Actual output:
0


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

if a%2!=0 or b%2!=0 or c%2!=0:
  print(0)
  exit()
elif a==b==c:
  print(-1)
  exit()
    
ans=0  

while a%2==0 and b%2==0 and c%2==0:
  num_a,num_b,num_c=a/2,b/2,c/2
  a=num_b+num_c
  b=num_a+num_c
  c=num_a+num_b
  ans+=1
print(ans)

Problem: p03723
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, C = list(map(int, input().split()))

ListA = [A]*10000
ListB = [B]*10000
ListC = [C]*10000

for i in range (1, 10000):
	ListA[i]= ListB[i-1]/2+ListC[i-1]/2
	ListB[i]= ListA[i-1]/2+ListC[i-1]/2
	ListC[i]= ListA[i-1]/2+ListB[i-1]/2
	if ListA[i]%2==1 or ListB[i]%2==1 or ListC[i]%2==1:
			print(i)
			exit()

print(-1)

Failing test case input:
1390 18 6815

Expected output:
0


Actual output:
51


Fixed submission (verdict: Accepted):
A, B, C = list(map(int, input().split()))

ListA = [A]*10000
ListB = [B]*10000
ListC = [C]*10000

if A%2==1 or B%2==1 or C%2==1:
	print(0)
	exit()

for i in range (1, 10000):
	ListA[i]= ListB[i-1]/2+ListC[i-1]/2
	ListB[i]= ListA[i-1]/2+ListC[i-1]/2
	ListC[i]= ListA[i-1]/2+ListB[i-1]/2
	if ListA[i]%2==1 or ListB[i]%2==1 or ListC[i]%2==1:
			print(i)
			exit()

print(-1)

Problem: p03723
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
A, B, C = map(int, input().split())
X = (A|B|C)^(A&B&C)
ans = (X&-X).bit_length()-1
print(ans)


Failing test case input:
15 25 13

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
A, B, C = map(int, input().split())
X = (A|B|C)^(A&B&C)
ans = (X&-X).bit_length()-1
print(0 if (A|B|C)&1 else ans)
Problem: p03723
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c = map(int,input().split())

if (a == b ) and (b == c):
  print(-1)
elif (a%2!=0) or (b%2!=0) or (c%2!=0):
  print(-1)
else:
  def exchange(a,b,c):
    return (b+c)/2,(c+a)/2,(a+b)/2
  num = 0
  ans = 0
  while num  == 0:
    a,b,c = exchange(a,b,c)
    ans += 1
    for j in range(3):
      if [a,b,c][j] % 2 ==1:
        num = 1
  print(ans)

Failing test case input:
1614 29 7744

Expected output:
0


Actual output:
-1


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

if (a%2!=0) or (b%2!=0) or (c%2!=0):
  print(0)
elif (a == b ) and (b == c):
  print(-1)
else:
  def exchange(a,b,c):
    return (b+c)/2,(c+a)/2,(a+b)/2
  num = 0
  ans = 0
  while num  == 0:
    a,b,c = exchange(a,b,c)
    ans += 1
    for j in range(3):
      if [a,b,c][j] % 2 ==1:
        num = 1
  print(ans)

Problem: p03723
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b,c=map(int,input().split())
if a==b==c:
    print(-1)
else:
    total=0
    while True:
        x=a/2
        y=b/2
        z=c/2
        a=y+z
        b=x+z
        c=x+y
        total+=1
        if a%2!=0 or b%2!=0 or c%2!=0:
            print(total)
            break

Failing test case input:
-3 0 -2

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
a,b,c=map(int,input().split())
if a%2!=0 or b%2!=0 or c%2!=0:
    print(0)
elif a==b==c:
    print(-1)
else:
    total=0
    while True:
        x=a/2
        y=b/2
        z=c/2
        a=y+z
        b=x+z
        c=x+y
        total+=1
        if a%2!=0 or b%2!=0 or c%2!=0:
            print(total)
            break

Problem: p03723
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
A,B,C = map(int, input().split())
a = [A]
b = [B]
c = [C]
count = 0
for i in range(10 ** 9):
 
    if a[i] == b[i] == c[i]:
        count = -1
        break
    elif a[i] % 2 == 1 or b[i] % 2 == 1 or c[i] % 2 == 1:
        if count == 0:
            count += 1
        break
    else:
        a.append(b[i] / 2 + c[i] / 2)
        b.append(a[i] / 2 + c[i] / 2)
        c.append(a[i] / 2 + b[i] / 2)
        count += 1

print(count)


Failing test case input:
15 14 7

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
A,B,C = map(int, input().split())
a = [A]
b = [B]
c = [C]
count = 0
sum = A + B + C
for i in range(10 ** 9):

    if a[i] == b[i] == c[i]:
        if a[i] % 2 == 0 and b[i] % 2 == 0 and c[i] % 2 == 0:
            count = -1
            break
        else:
            count = 0
            break
    elif a[i] % 2 == 0 and b[i] % 2 == 0 and c[i] % 2 == 0:
        a.append(b[i] / 2 + c[i] / 2)
        b.append(a[i] / 2 + c[i] / 2)
        c.append(a[i] / 2 + b[i] / 2)
        count += 1
    else:
        break


print(count)
Problem: p03723
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c=map(int, input().split())
d=0
while d<10**4:
    a,b,c=b/2+c/2,a/2+c/2,a/2+b/2
    d+=1
    if a%2==1 or b%2==1 or c%2==1:break
else:d=-1
print(d)

Failing test case input:
-3 0 -2

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
a,b,c=map(int, input().split())
d=0
while d<10**5:
    if a%2==1 or b%2==1 or c%2==1:break
    a,b,c=b/2+c/2,a/2+c/2,a/2+b/2
    d+=1
else:d=-1
print(d)

Problem: p03723
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,C = map(int,input().split())
cou = 0
if(A % 2 == 1 or B % 2 == 1 or C % 2 == 1):
  print("0")
while(cou < 10**6):
  cou += 1
  a = A
  b = B
  c = C
  A = b/2 + c/2
  B = a/2 + c/2
  C = a/2 + b/2
  if(A % 2 == 1 or B % 2 == 1 or C % 2 == 1):
    print(str(cou))
    exit()
  else:
    pass
print("-1")

Failing test case input:
-11 -1 -4

Expected output:
0


Actual output:
0
2


Fixed submission (verdict: Accepted):
A,B,C = map(int,input().split())
cou = 0
if(A % 2 == 1 or B % 2 == 1 or C % 2 == 1):
  print("0")
  exit()
while(cou < 10**6):
  cou += 1
  a = A
  b = B
  c = C
  A = b/2 + c/2
  B = a/2 + c/2
  C = a/2 + b/2
  if(A % 2 == 1 or B % 2 == 1 or C % 2 == 1):
    print(str(cou))
    exit()
  else:
    pass
print("-1")

Problem: p03723
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b,c = map(int, input().split())
for i in range(10**6):
  temp1 = a
  temp2 = b
  temp3 = c
  a = int((temp2+temp3)/2)
  b = int((temp1+temp3)/2)
  c = int((temp1+temp2)/2)
  if a % 2 != 0 or b % 2 != 0 or c % 2 != 0:
    break
if i == 10**6 - 1:
  print(-1)
else:
  print(i+1)

Failing test case input:
1390 180 2625

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
a,b,c = map(int, input().split())
if a % 2 != 0 or b % 2 != 0 or c % 2 != 0:
  print(0)
else:
  for i in range(10**6):
    temp1 = a
    temp2 = b
    temp3 = c
    a = int((temp2+temp3)/2)
    b = int((temp1+temp3)/2)
    c = int((temp1+temp2)/2)
    if a % 2 != 0 or b % 2 != 0 or c % 2 != 0:
      break
  if i == 10**6 - 1:
    print(-1)
  else:
    print(i+1)

Problem: p03723
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
a,b,c=map(int,input().split())
ans=0
if a%2==1 or b%2==1 or c%2==1:
    print(-1)
    sys.exit()
if a%2==0 and a==b==c:
    print(-1)
    sys.exit()
while a%2==0 and b%2==0 and c%2==0:
    ta=a/2
    tb=b/2
    tc=c/2
    a=tb+tc
    b=ta+tc
    c=ta+tb
    ans+=1
print(ans)

Failing test case input:
15 14 7

Expected output:
0


Actual output:
-1


Fixed submission (verdict: Accepted):
import sys
a,b,c=map(int,input().split())
ans=0
if a%2==1 or b%2==1 or c%2==1:
    print(0)
    sys.exit()
if a%2==0 and a==b==c:
    print(-1)
    sys.exit()
while a%2==0 and b%2==0 and c%2==0:
    ta=a/2
    tb=b/2
    tc=c/2
    a=tb+tc
    b=ta+tc
    c=ta+tb
    ans+=1
print(ans)
Problem: p03723
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c = list(map(int, input().split()))

cnt = 0
if (a == b) and (b == c) and (a%2==0):
    print(-1)
elif (a == b) and (b == c) and (a%2!=0):
    print(0)
else:
    while(True):
        a_ = a/2
        b_ = b/2
        c_ = c/2
        a = b_ + c_
        b = a_ + c_
        c = a_ + b_
        cnt+=1
        if a%2!=0 or b%2!=0 or c%2!=0:
            print(cnt)
            exit()

Failing test case input:
1090 27 6797

Expected output:
0


Actual output:
1


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

cnt = 0
if (a == b) and (b == c) and (a%2==0):
    print(-1)
elif (a%2!=0) or b%2!=0 or c%2!=0:
    print(0)
else:
    while(True):
        a_ = a/2
        b_ = b/2
        c_ = c/2
        a = b_ + c_
        b = a_ + c_
        c = a_ + b_
        cnt+=1
        if a%2!=0 or b%2!=0 or c%2!=0:
            print(cnt)
            exit()

Problem: p03723
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, C = [int(_) for _ in input().split()]
if [A - B, A - C] == [0, 0] or any([A % 2, B % 2, C % 2]):
    print(-1)
    exit()
i = 0
while not any([(B + C) % 2, (C + A) % 2, (A + B) % 2]):
    A, B, C = (B + C) / 2, (C + A) / 2, (A + B) / 2
    i += 1
print(i)


Failing test case input:
608 32 6797

Expected output:
0


Actual output:
-1


Fixed submission (verdict: Accepted):
A, B, C = [int(_) for _ in input().split()]
if [A - B, A - C] == [0, 0] and A % 2 == 0:
    print(-1)
    exit()
i = 0
while not any([A % 2, B % 2, C % 2]):
    A, B, C = (B + C) / 2, (C + A) / 2, (A + B) / 2
    i += 1
print(i)

Problem: p03723
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c = [int(x) for x in input().strip().split()]

def f(a, b, c, count):
    if a % 2 == 1 and b % 2 == 1 and c % 2 == 1:
        count += 1
        return f(a/2+b/2, c/2+b/2, a/2+c/2, count)
    elif a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
        count += 1
        return f(a/2+b/2, c/2+b/2, a/2+c/2, count)
    else:
        return count

if a == b and b == c:
    print(-1)
else:
    print(f(a, b, c, 0))


Failing test case input:
15 17 7

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
a, b, c = [int(x) for x in input().strip().split()]

def f(a, b, c, count):
    if a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
        count += 1
        return f(a/2+b/2, c/2+b/2, a/2+c/2, count)
    else:
        return count

if a == b and b == c and a % 2 == 0:
    print(-1)
else:
    print(f(a, b, c, 0))
Problem: p03723
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b,c=map(int,input().split())
if a==b==c:
    print(-1)
else:
    while True:
        total=0
        x=a/2
        y=b/2
        z=c/2
        a=y+z
        b=x+z
        c=x+y
        total+=1
        if a%2!=0 or b%2!=0 or c%2!=0:
            print(total)
            break

Failing test case input:
1390 18 4202

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
a,b,c=map(int,input().split())
if a%2!=0 or b%2!=0 or c%2!=0:
    print(0)
elif a==b==c:
    print(-1)
else:
    total=0
    while True:
        x=a/2
        y=b/2
        z=c/2
        a=y+z
        b=x+z
        c=x+y
        total+=1
        if a%2!=0 or b%2!=0 or c%2!=0:
            print(total)
            break

Problem: p03723
Buggy submission (Python (3.8.2), verdict: Wrong Answer):


A, B, C = map(int, input().split())
a, b, c = A, B, C
i = 0
while True:
    if (A % 2 == 0 and B % 2 == 0 and C % 2 == 0):
        i += 1
        a, b, c = A, B, C
        A = (b+c)/2
        B = (c+a)/2
        C = (a+b)/2
        print(A,B,C)
        if(A == a and B == b and C == c):
            print(-1)
            break
    else:
        print(i)
        break
        if(A == a and B == b and C == c):
            print(-1)
            break


Failing test case input:
454 414 1200

Expected output:
1


Actual output:
807.0 827.0 434.0
1


Fixed submission (verdict: Accepted):


A, B, C = map(int, input().split())
a, b, c = A, B, C
i = 0
while True:
    if (A % 2 == 0 and B % 2 == 0 and C % 2 == 0):
        i += 1
        a, b, c = A, B, C
        A = (b+c)/2
        B = (c+a)/2
        C = (a+b)/2
 
        if(A == a and B == b and C == c):
            print(-1)
            break
    else:
        print(i)
        break
        if(A == a and B == b and C == c):
            print(-1)
            break

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

a,b,c = map(int,input().split())

count = 0
flag = 0
while True:
    at = (b+c)/2
    bt = (a+c)/2
    ct = (b+a)/2

    if flag == 1 and at == a and bt == b and ct == c:
        flag = 0
        break
    
    a = at
    b = bt
    c = ct
    
    count += 1
    flag = 1
    if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
        break

if flag == 0:
    print(-1)
else:
    print(count)

Failing test case input:
502 172 375

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):

a,b,c = map(int,input().split())

count = 0
flag = 0
while True:
    at = (b+c)/2
    bt = (a+c)/2
    ct = (b+a)/2

    if flag == 0 and (a % 2 == 1 or b % 2 == 1 or c % 2 == 1):
        flag = 1
        break
    if flag == 1 and at == a and bt == b and ct == c:
        flag = 0
        break
    
    a = at
    b = bt
    c = ct
    
    count += 1
    flag = 1
    if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
        break

if flag == 0:
    print(-1)
else:
    print(count)
Problem: p03723
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,C=[int(s) for s in input().split(" ")]

A=[A]
B=[B]
C=[C]

Count=0
for i in range(1000):
    A.append(B[i]/2+C[i]/2)
    B.append(A[i]/2+C[i]/2)
    C.append(B[i]/2+A[i]/2)
    Count+=1
    if A[i+1]%2!=0 or B[i+1]%2!=0 or C[i+1]%2!=0:
        break
    if Count>=1000:
        Count=-1

print(Count)

Failing test case input:
781 414 1200

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
A,B,C=[int(s) for s in input().split(" ")]

A=[A]
B=[B]
C=[C]

Count=0
for i in range(1000000000):
    A.append(B[i]
    B.append(A[i]
    C.append(B[i]
    Count+=1
    if A[i+1]%2!=0 or B[i+1]%2!=0 or C[i+1]%2!=0:
        break
    if Count>=100000:
        Count=-1
        break
       
    
print(0 if A[0]%2!=0 or B[0]%2!=0 or C[0]%2!=0 else Count)

Problem: p03723
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
*a, = map(int,input().split())
if any(map(lambda x: bin(x)[-1]== "1", a)):
    print("-1")
    exit()
a = [bin(abs(a[i+1]-a[i]))[::-1].find('1') for i in range(2)]
print(max(a) if a[0]*a[1]<0 else min(a))

Failing test case input:
17 25 13

Expected output:
0


Actual output:
-1


Fixed submission (verdict: Accepted):

*a, = map(int,input().split())
if any(map(lambda x: bin(x)[-1]== "1", a)):
    print("0")
    exit()
a = [bin(abs(a[i+1]-a[i]))[::-1].find('1') for i in range(2)]
print(max(a) if a[0]*a[1]<0 else min(a))

Problem: p03723
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, C = list(map(int, input().split()))
count = 0
while True:
	if A % 2 == 1 or B % 2 == 1 or C % 1 == 1:
		break
	else:
		AA = int((B + C) / 2)
		BB = int((C + A) / 2)
		CC = int((A + B) / 2)
		if AA == BB and BB == CC:
			count = -1
			break
		else:
			A = AA
			B = BB
			C = CC
			count += 1
print(count)

Failing test case input:
1592 128 6089

Expected output:
0


Actual output:
3


Fixed submission (verdict: Accepted):
A, B, C = list(map(int, input().split()))
count = 0
while True:
	if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:
		break
	else:
		AA = int((B + C) / 2)
		BB = int((C + A) / 2)
		CC = int((A + B) / 2)
		if AA == BB and BB == CC:
			count = -1
			break
		else:
			A = AA
			B = BB
			C = CC
			count += 1
print(count)

Problem: p03723
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
a, b, c = map(int, input().split())
if a == b and b == c:
  if a%2 == 0:
    print(-1)
  else:
    print(0)
else:
  ans = 0
  while a % 2 == 0 and b % 2 == 0:
    a1 = a
    b1 = b
    c1 = c
    a = (b1+c1)/2
    b = (a1+c1)/2
    c = (a1+b1)/2
    ans += 1
  print(ans)

Failing test case input:
0 6 -1

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
a, b, c = map(int, input().split())
if a == b and b == c:
  if a%2 == 0:
    print(-1)
  else:
    print(0)
else:
  ans = 0
  while a % 2 == 0 and b % 2 == 0 and c % 2 ==0:
    a1 = a
    b1 = b
    c1 = c
    a = (b1+c1)/2
    b = (a1+c1)/2
    c = (a1+b1)/2
    ans += 1
  print(ans)
Problem: p03723
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys
a,b,c = map(int,input().split(" "))
li = [[a,b,c]]
count = 0
for i in range(100):
  a2 = a/2
  b2 = b/2
  c2 = c/2
  a = b2+c2
  b = c2+a2
  c = a2+b2  
  count += 1
  if (a % 2)==1 or (b % 2)==1 or (c % 2)==1:
    break
  elif [a,b,c] in li:
    print(-1)
    sys.exit()
  else:
    li.append([a,b,c])
    
print(count)

Failing test case input:
1277 32 4674

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
import sys
a,b,c = map(int,input().split(" "))
li = [[a,b,c]]
count=0

for i in range(10**9):
  if (a % 2)==1 or (b % 2)==1 or (c % 2)==1:
    break
  else:
    a2 = a/2
    b2 = b/2
    c2 = c/2
    a = b2+c2
    b = c2+a2
    c = a2+b2  
    count += 1
  if [a,b,c] in li:
    print(-1)
    sys.exit()
  else:
    li.append([a,b,c])
    
print(count)

Problem: p03723
Buggy submission (Python (3.8.2), verdict: Wrong Answer):


A, B, C = map(int, input().split())
a, b, c = A, B, C
i = 0
while True:
    if (A % 2 == 0 and B % 2 == 0 and C % 2 == 0):
        i += 1
        a, b, c = A, B, C
        A = (b+c)/2
        B = (c+a)/2
        C = (a+b)/2

        if(A == a or B == b or C == c):
            print(-1)
            break
    else:
        if(A == a or B == b or C == c):
            print(-1)
            break
        print(i)
        break


Failing test case input:
17 541 86

Expected output:
0


Actual output:
-1


Fixed submission (verdict: Accepted):


A, B, C = map(int, input().split())
a, b, c = A, B, C
i = 0
while True:
    if (A % 2 == 0 and B % 2 == 0 and C % 2 == 0):
        i += 1
        a, b, c = A, B, C
        A = (b+c)/2
        B = (c+a)/2
        C = (a+b)/2
 
        if(A == a and B == b and C == c):
            print(-1)
            break
    else:
        print(i)
        break
        if(A == a and B == b and C == c):
            print(-1)
            break

Problem: p03723
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, C = list(map(int, input().split()))

cnt = 0
while cnt < 28:
    tmpA = int(B / 2) + int(C / 2)
    tmpB = int(A / 2) + int(C / 2)
    tmpC = int(A / 2) + int(B / 2)

    cnt += 1
    if tmpA % 2 == 1 or tmpB % 2 == 1 or tmpC % 2 == 1:
        break
    if tmpA == A and tmpB == B and tmpC == C:
        print("-1")
        quit()
    A = tmpA
    B = tmpB
    C = tmpC

if cnt == 28:
    print("-1")
else:
    print(str(cnt))


Failing test case input:
-1 2 -1

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
A, B, C = list(map(int, input().split()))

cnt = 0
while cnt < 27:
    if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:
        break
    tmpA = int(B / 2) + int(C / 2)
    tmpB = int(A / 2) + int(C / 2)
    tmpC = int(A / 2) + int(B / 2)

    cnt += 1
    if tmpA == A and tmpB == B and tmpC == C:
        print("-1")
        quit()
    A = tmpA
    B = tmpB
    C = tmpC

if cnt == 28:
    print("-1")
else:
    print(str(cnt))
Problem: p03723
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, C = [int(_) for _ in input().split()]
if [A - B, A - C] == [0, 0]:
    print(-1)
    exit()
i = 0
while not any([(B + C) % 2, (C + A) % 2, (A + B) % 2]):
    A, B, C = (B + C) / 2, (C + A) / 2, (A + B) / 2
    i += 1
print(i)


Failing test case input:
-5 -1 -3

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
A, B, C = [int(_) for _ in input().split()]
if [A - B, A - C] == [0, 0] and A % 2 == 0:
    print(-1)
    exit()
i = 0
while not any([A % 2, B % 2, C % 2]):
    A, B, C = (B + C) / 2, (C + A) / 2, (A + B) / 2
    i += 1
print(i)

Problem: p03723
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def solve(a, b, c):
    if (a, b, c) in s:
        return -1
    s.add((a, b, c))
    if (a % 2) or (b % 2) or (c % 2):
        return 0
    a >>= 1
    b >>= 1
    c >>= 1
    return 1 + solve(b + c , c + a, a + b)

if __name__ == '__main__':
    a, b, c = map(int, input().split())
    s = set()
    print(solve(a, b, c))



Failing test case input:
14 14 14

Expected output:
-1

Actual output:
0


Fixed submission (verdict: Accepted):
def solve(a, b, c, ans):
    if (a, b, c) in s:
        return -1
    if (a % 2) or (b % 2) or (c % 2):
        return ans
    s.add((a, b, c))
    a >>= 1
    b >>= 1
    c >>= 1
    return solve(b + c , c + a, a + b, ans + 1)

if __name__ == '__main__':
    a, b, c = map(int, input().split())
    s = set()
    print(solve(a, b, c, 0))

Problem: p03723
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,C=map(int,input().split())
if A == B == C:
	print((A % 2) - 1)
else:
	i = 0
	while (A % 2) == (B%2) == (C%2==0):
		A,B,C = (B/2) + (C/2), (C/2) + (A/2), (A/2) + (B/2)
		i += 1
	print(i)


Failing test case input:
-11 -1 -2

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
A,B,C=map(int,input().split())
if A == B == C:
	print((A % 2) - 1)
else:
	i = 0
	while (A % 2) == (B%2) == (C%2) == 0:
		A,B,C = (B
		i += 1
	print(i)

Problem: p03723
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b,c=454,414,444

ans=0
if a==b==c:
  print("-1")
else:
  while a%2==0 and b%2==0 and c%2==0:
    num_a,num_b,num_c=a/2,b/2,c/2
    a=num_b+num_c
    b=num_a+num_c
    c=num_a+num_b
    ans+=1
  
print(ans)

Failing test case input:
1390 213 2625

Expected output:
0


Actual output:
1


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

if a%2!=0 or b%2!=0 or c%2!=0:
  print(0)
  exit()
elif a==b==c:
  print(-1)
  exit()
    
ans=0  

while a%2==0 and b%2==0 and c%2==0:
  num_a,num_b,num_c=a/2,b/2,c/2
  a=num_b+num_c
  b=num_a+num_c
  c=num_a+num_b
  ans+=1
print(ans)
Problem: p03723
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

a,b,c = map(int,input().split())

count = 0
flag = 0
while True:
    at = (b+c)/2
    bt = (a+c)/2
    ct = (b+c)/2

    if flag == 1 and at == a and bt == b and ct == c:
        flag = 0
        break
    
    a = at
    b = bt
    c = ct
    
    count += 1
    flag = 1
    if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
        break

if flag == 0:
    print(-1)
else:
    print(count)


Failing test case input:
-5 0 -3

Expected output:
0


Actual output:
-1


Fixed submission (verdict: Accepted):

a,b,c = map(int,input().split())

count = 0
flag = 0
while True:
    at = (b+c)/2
    bt = (a+c)/2
    ct = (b+a)/2

    if flag == 0 and (a % 2 == 1 or b % 2 == 1 or c % 2 == 1):
        flag = 1
        break
    if flag == 1 and at == a and bt == b and ct == c:
        flag = 0
        break
    
    a = at
    b = bt
    c = ct
    
    count += 1
    flag = 1
    if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
        break

if flag == 0:
    print(-1)
else:
    print(count)

Problem: p03723
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
A,B,C = map(int, input().split())
a = [A]
b = [B]
c = [C]
count = 0
for i in range(10 ** 9):
 
    if a[i] == b[i] == c[i]:
        count = -1
        break
    elif a[i] % 2 == 1 or b[i] % 1 == 0 or c[i] % 2 == 1:
        break
    else:
        a.append(b[i] / 2 + c[i] / 2)
        b.append(a[i] / 2 + c[i] / 2)
        c.append(a[i] / 2 + b[i] / 2)
        count += 1

print(count)

Failing test case input:
1390 94 1200

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
A,B,C = map(int, input().split())
a = [A]
b = [B]
c = [C]
count = 0
sum = A + B + C
for i in range(10 ** 9):

    if a[i] == b[i] == c[i]:
        if a[i] % 2 == 0 and b[i] % 2 == 0 and c[i] % 2 == 0:
            count = -1
            break
        else:
            count = 0
            break
    elif a[i] % 2 == 0 and b[i] % 2 == 0 and c[i] % 2 == 0:
        a.append(b[i] / 2 + c[i] / 2)
        b.append(a[i] / 2 + c[i] / 2)
        c.append(a[i] / 2 + b[i] / 2)
        count += 1
    else:
        break


print(count)
Problem: p03307
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N = int(input())    
if(N%2==0):
    ans=N
else:
    ans=2*N
print(N)

Failing test case input:
8325199727

Expected output:
16650399454


Actual output:
8325199727


Fixed submission (verdict: Accepted):
N = int(input())    
if(N%2==0):
    ans=N
else:
    ans=2*N
print(ans)

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


 
def main():
	N = int(input())
	while N % 2 == 0:
		N = N / 2
	print(int(N*2))
 
if __name__ == '__main__':
	main()

Failing test case input:
419774028

Expected output:
419774028


Actual output:
209887014


Fixed submission (verdict: Accepted):


 
def main():
	N = int(input())
	if N % 2 == 0:
		print(int(N))
	else:
		print(int(N*2))
 
if __name__ == '__main__':
	main()

Problem: p03307
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
if n % 2 == 0:
  print(n)
else:
  print(n + 1)

Failing test case input:
2165708527

Expected output:
4331417054


Actual output:
2165708528


Fixed submission (verdict: Accepted):
n = int(input())
if n % 2 == 0:
  print(n)
else:
  print(n * 2)

Problem: p03307
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = int(input())
if int(s/2) != 0:
    print(2*s)
else:
    print(s)

Failing test case input:
185940122

Expected output:
185940122


Actual output:
371880244


Fixed submission (verdict: Accepted):
s = int(input())
if int(s%2):
    print(2*s)
else:
    print(s)

Problem: p03307
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
if n%2 == 0:
    print(n/2)
    exit()
print(n*2)

Failing test case input:
1494912

Expected output:
1494912


Actual output:
747456.0


Fixed submission (verdict: Accepted):
n = int(input())
if n%2 == 0:
    print(n)
    exit()
print(n*2)

Problem: p03307
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def m():
    n = int(input())
    if n % 2 == 0:
        return n
    return n*2

Failing test case input:
1031129102

Expected output:
1031129102


Actual output:

Fixed submission (verdict: Accepted):
def m():
    n = int(input())
    if n % 2 == 0:
        return n
    return n*2

print(m())

Problem: p03307
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
if n == 2 or n == 1:
    print(2)
else:
    print(n * 2)

Failing test case input:
215616

Expected output:
215616


Actual output:
431232


Fixed submission (verdict: Accepted):
n = int(input())
if n == 2 or n == 1:
    print(2)
elif n % 2 == 1:
    print(n * 2)
else:
    print(n)

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

a = int(stdin.readline().rstrip())
x = a * 2
print(x)


Failing test case input:
63978

Expected output:
63978


Actual output:
127956


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

a = int(stdin.readline().rstrip())
if a % 2 == 0:
    print(a)
else:
    x = a * 2
    print(x)
Problem: p03307
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
if n / 2 != 0:
    n *= 2
print(n)

Failing test case input:
342557264

Expected output:
342557264


Actual output:
685114528


Fixed submission (verdict: Accepted):
n = int(input())
if n % 2 != 0:
    n *= 2
print(n)

Problem: p03307
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
if n%2 == 0:
    print(n/2)
else:
    print(n*2)

Failing test case input:
1031129102

Expected output:
1031129102


Actual output:
515564551.0


Fixed submission (verdict: Accepted):
n = int(input())
if n%2 == 0:
    print(int(n))
else:
    print(int(n*2))

Problem: p03307
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
if n % 2 == 0:
  print(0)
else:
  print(2*n)

Failing test case input:
1494912

Expected output:
1494912


Actual output:
0


Fixed submission (verdict: Accepted):
n = int(input())
if n % 2 == 0:
  print(n)
else:
  print(2*n)

Problem: p03307
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
if N % 2 == 0:
    print(N)
else:
    print(N)

Failing test case input:
1018479

Expected output:
2036958


Actual output:
1018479


Fixed submission (verdict: Accepted):
N = int(input())
if N % 2 == 0:
    print(N)
else:
    print(2 *N)

Problem: p03307
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
if(N%10 == 0):
  print(N)
else:
  print(N*2)

Failing test case input:
613474

Expected output:
613474


Actual output:
1226948


Fixed submission (verdict: Accepted):
N = int(input())
if(N%2 == 0):
  print(N)
else:
  print(N*2)

Problem: p03307
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
print(n) if n%2 == 0 else print('No')

Failing test case input:
964913573

Expected output:
1929827146


Actual output:
No


Fixed submission (verdict: Accepted):
n = int(input())
print(n) if n%2 == 0 else print(n*2)

Problem: p03307
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
s = n % 2
if (s == 0):
    print(2)
else:
    t = n * 2
    print(t)

Failing test case input:
2384804058

Expected output:
2384804058


Actual output:
2


Fixed submission (verdict: Accepted):
n = int(input())

if (n%2 == 0):
    print(n)
else:
    print(2*n)

Problem: p03307
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
print((n*2) if n%2 == 0 else n)

Failing test case input:
63978

Expected output:
63978


Actual output:
127956


Fixed submission (verdict: Accepted):
n = int(input())
print(n if n%2 == 0 else n*2)

Problem: p03307
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
if n%2 == 0:
    print(n*2)
else:
    print(n)

Failing test case input:
2049048611

Expected output:
4098097222


Actual output:
2049048611


Fixed submission (verdict: Accepted):
n = int(input())
if n % 2 == 1:
    print(n*2)
else:
    print(n)