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

for i in range(3):
    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(i + 1)
        exit(0)
else:
    print(-1)


Failing test case input:
-11 -1 -4

Expected output:
0


Actual output:
2


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.4.3), verdict: Wrong Answer):
a, b, c = list(map(int, input().split()))
if a%2 or b%2 or c%2:
    print("0")
aa = [a, (b+c)/2]
bb = [b, (c+a)/2]
cc = [c, (a+b)/2]
ans = []
for li in [aa,bb,cc]:
    DP = li
    if DP[0] == DP[1]:
        can = -1
        ans.append(can)
        continue
    can = 1
    while True:
        next = sum(DP)
        if next %2:
            break
        else:
            DP = [DP[0], next/2]
            can += 1
    ans.append(can)

hoge = -1
ans.sort()
for i in ans:
    if i > 0:
        hoge=i
        break
print(hoge)

Failing test case input:
1556 47 7744

Expected output:
0


Actual output:
0
1


Fixed submission (verdict: Accepted):
a, b, c = list(map(int, input().split()))
if a%2 or b%2 or c%2:
    print("0")
    exit()
aa = [a, (b+c)/2]
bb = [b, (c+a)/2]
cc = [c, (a+b)/2]
ans = []
for li in [aa,bb,cc]:
    DP = li
    if DP[0] == DP[1]:
        can = -1
        ans.append(can)
        continue
    can = 1
    while True:
        next = sum(DP)
        if next %2:
            break
        else:
            DP = [DP[0], next/2]
            can += 1
    ans.append(can)

hoge = -1
ans.sort()
for i in ans:
    if i > 0:
        hoge=i
        break
print(hoge)

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

cnt = 0
while cnt < 27:
    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 == 27:
    print("-1")
else:
    print(str(cnt))

Failing test case input:
2680 18 6815

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):
def cookies_exchanges(a, b, c):
    counter = 0
    if a is b is c:
        return -1
    while int(a%2) is 0 and int(b%2) is 0 and int(c%2) is 0:
        o_a, o_b, o_c = a ,b ,c
        a = o_b/2 + o_c/2
        b = o_a/2 + o_c/2
        c = o_a/2 + o_b/2
        counter += 1

    return counter

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


Failing test case input:
1390 213 4202

Expected output:
0


Actual output:

Fixed submission (verdict: Accepted):
def cookies_exchanges(a, b, c):
    counter = 0

    olds = []
    while int(a%2) is 0 and int(b%2) is 0 and int(c%2) is 0:
        if (a, b, c) in olds:
            return -1

        olds.append((a,b,c))
        o_a, o_b, o_c = olds[counter]
        a = o_b/2 + o_c/2
        b = o_a/2 + o_c/2
        c = o_a/2 + o_b/2
        counter += 1

    return counter

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

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

if A%2!=0 or B%2!=0 or C%2!=0:
        print(counter)
for i in range(1000000000):
    if A==B and B==C:
        print('-1')
        break
    
    AA=B/2+C/2
    BB=A/2+C/2
    CC=A/2+B/2
    counter=counter+1
    if AA%2!=0 or BB%2!=0 or CC%2!=0:
        print(counter)
        break
    A=AA
    B=BB
    C=CC

Failing test case input:
1592 32 6089

Expected output:
0


Actual output:
0
1


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

for i in range(100000000):
    
    if A%2!=0 or B%2!=0 or C%2!=0:
        print(counter)
        break
    if A==B and B==C:
        print('-1')
        break
    
    AA=B/2+C/2
    BB=A/2+C/2
    CC=A/2+B/2
    counter=counter+1
    if AA%2!=0 or BB%2!=0 or CC%2!=0:
        print(counter)
        break
    A=AA
    B=BB
    C=CC

Problem: p03723
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c=map(int, input().split())
d=0
while d<10**5:
    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:
78 321 375

Expected output:
0


Actual output:
2


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())
if A==B==C:
    print(-1)
else:
    count=0
    while A%2==B%2==C%2==0:
        A=(B+C)/2
        B=(C+A)/2
        C=(A+B)/2
        count+=1
    print(count)

Failing test case input:
454 414 846

Expected output:
3


Actual output:
2


Fixed submission (verdict: Accepted):
A,B,C=map(int,input().split())
if A==B==C:
    print(0 if A%2 else -1)
else:
    count=0
    while A%2==B%2==C%2==0:
        A,B,C=(B+C)/2,(C+A)/2,(A+B)/2
        count+=1
    print(count)
Problem: p03723
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
    a, b, c = map(int, input().split())

    count = 0
    while True:
        count += 1
        i, j, k = a / 2, b / 2, c / 2
        a, b, c = j + k, k + i, i + j

        if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
            print(count)
            break
        elif a == b == c:
            print(-1)
            break


if __name__ == '__main__':
    main()


Failing test case input:
1090 27 7744

Expected output:
0


Actual output:
1


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

    count = 0
    while True:
        if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
            print(count)
            break
        elif a == b == c:
            print(-1)
            break
        count += 1
        i, j, k = a / 2, b / 2, c / 2
        a, b, c = j + k, k + i, i + j


if __name__ == '__main__':
    main()

Problem: p03723
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
a, b, c = map(int, input().split())
count = 0
for i in range(10**3):
    a, b, c = b/2 + c/2, a/2 + c/2, a/2 + b/2
    count += 1
    if a%2 != 0 or b%2 != 0 or c%2 != 0:
        print(count)
        exit()
print(-1)

Failing test case input:
502 106 375

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
a, b, c = map(int, input().split())
count = 0
for i in range(10**3):
    if a%2 != 0 or b%2 != 0 or c%2 != 0:
        print(count)
        exit()
    a, b, c = b/2 + c/2, a/2 + c/2, a/2 + b/2
    count += 1
print(-1)

Problem: p03723
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a, b, c = map(int, input().split())
a_tmp = a ; b_tmp = b ; c_tmp = c
count = 0
while True :
    count += 1
    a = b_tmp/2 + c_tmp/2
    b = a_tmp/2 + c_tmp/2
    c = a_tmp/2 + b_tmp/2
    a_tmp = a ; b_tmp = b ; c_tmp = c
    if a%2 == 1 or b%2 == 1 or c%2 == 1 :
        print(count)
        break
    elif count > 100000 :
        print("-1")
        break
    else :
        continue


Failing test case input:
1556 47 7744

Expected output:
0


Actual output:
-1


Fixed submission (verdict: Accepted):
a, b, c = map(int, input().split())
a_tmp = a ; b_tmp = b ; c_tmp = c
count = 0
while True :
    if a == b == c and a%2 == 0 :
        print("-1")
        break
    elif a%2 == 1 or b%2 == 1 or c%2 == 1 :
        print(count)
        break
    else :
        a = b_tmp/2 + c_tmp/2
        b = a_tmp/2 + c_tmp/2
        c = a_tmp/2 + b_tmp/2
        a_tmp = a ; b_tmp = b ; c_tmp = c
        count += 1
Problem: p03723
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c = map(int, input().split())
if a == b == c:
    print(-1)
for i in range(1, 10**5):
    a, b, c = (b+c) / 2, (c+a)/2, (a+b)/2
    if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
        print(i)
        exit()

Failing test case input:
502 172 375

Expected output:
0


Actual output:
1


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

Problem: p03723
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
A,B,C =map(int,input().split())
con = 0
if A % 2 == 1 or B % 2 == 1 or C % 1 == 0:
  print(0)
  exit()
if A == B and B == C:
  print(-1)
  exit()
while A % 2 == 0 and B % 2 == 0 and C % 2 == 0:
  con += 1
  D = A / 2
  E = B / 2
  F = C / 2
  A = E + F
  B = D + F
  C = D + E
  
print(con)

Failing test case input:
1076 32 4674

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
A,B,C =map(int,input().split())
con = 0
if A % 2 == 1 or B % 2 == 1 or C % 1 == 1:
  print(0)
  exit()
if A == B and B == C:
  print(-1)
  exit()
while A % 2 == 0 and B % 2 == 0 and C % 2 == 0:
  con += 1
  D = A / 2
  E = B / 2
  F = C / 2
  A = E + F
  B = D + F
  C = D + E
print(con)

Problem: p03723
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys
a,b,c = map(int,input().split(" "))
li = [[a,b,c]]
if (a % 2)==1 or (b % 2)==1 or (c % 2)==1:
  print(0)
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:
1592 128 6089

Expected output:
0


Actual output:
0
51


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.4.3), verdict: Wrong Answer):
A,B,C = map(int,input().split())
def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)
A = Base_10_to_n(A, 2)[::-1]
B = Base_10_to_n(B, 2)[::-1]
C = Base_10_to_n(C, 2)[::-1]
if A == B == C:
    print(-1)
else:
    ans = 0
    for i in range(min(len(A),len(B),len(C))):
        if A[i] == B[i] == C[i]:
            ans += 1
        else:
            break
    print(ans)

Failing test case input:
17 25 13

Expected output:
0


Actual output:
2


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)
elif A == B == C:
    print(-1)
else:
    def Base_10_to_n(X, n):
        if X
            return Base_10_to_n(X
        return str(X%n)
    A = Base_10_to_n(A, 2)[::-1]
    B = Base_10_to_n(B, 2)[::-1]
    C = Base_10_to_n(C, 2)[::-1]
    ans = 0
    for i in range(min(len(A),len(B),len(C))):
        if A[i] == B[i] == C[i]:
            ans += 1
        else:
            break
    print(ans)

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

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

cnt = 0

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

Failing test case input:
1556 106 7744

Expected output:
1


Actual output:
3925.0 4650.0 831.0
1


Fixed submission (verdict: Accepted):
import math

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

cnt = 0

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

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 == 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:
4 12 20

Expected output:
3

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: p03723
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,C=map(int,input().split())
counter=0

if A%2!=0 or B%2!=0 or C%2!=0:
        print(counter)
for i in range(100000000):
    if A==B and B==C:
        print('-1')
        break
    
    AA=B/2+C/2
    BB=A/2+C/2
    CC=A/2+B/2
    counter=counter+1
    if AA%2!=0 or BB%2!=0 or CC%2!=0:
        print(counter)
        break
    A=AA
    B=BB
    C=CC

Failing test case input:
608 27 6797

Expected output:
0


Actual output:
0
1


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

for i in range(100000000):
    
    if A%2!=0 or B%2!=0 or C%2!=0:
        print(counter)
        break
    if A==B and B==C:
        print('-1')
        break
    
    AA=B/2+C/2
    BB=A/2+C/2
    CC=A/2+B/2
    counter=counter+1
    if AA%2!=0 or BB%2!=0 or CC%2!=0:
        print(counter)
        break
    A=AA
    B=BB
    C=CC

Problem: p03723
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, C = map(int, input().split())
cnt = 0
while(1):
    A_tmp = A
    B_tmp = B
    C_tmp = C
    A = (B_tmp+C_tmp)/2
    B = (A_tmp+C_tmp)/2
    C = (A_tmp+C_tmp)/2
    cnt += 1
    if A%2!=0 or B%2!=0 or C%2!=0:
        break
    if A_tmp==A and B_tmp==B and C_tmp==C:
        cnt = -1
        break
print(cnt)

Failing test case input:
1090 27 6797

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
A, B, C = map(int, input().split())
cnt = 0
while(1):
    if A%2!=0 or B%2!=0 or C%2!=0:
        break
    A_tmp = A
    B_tmp = B
    C_tmp = C
    A = (B_tmp+C_tmp)/2
    B = (A_tmp+C_tmp)/2
    C = (A_tmp+C_tmp)/2
    cnt += 1
    if A_tmp==A and B_tmp==B and C_tmp==C:
        cnt = -1
        break
print(cnt)

Problem: p03723
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from math import log2
a,b,c = map(int,input().split())
if a == b == c:
    print(-1)
else:
    ans = 1
    while True:
        A = b/2 + c/2
        B = a/2 + c/2
        C = a/2 + b/2
        if A % 2 != 0 or B % 2 != 0 or C % 2 != 0:
            break
        else:
            ans += 1
            a = A
            b = B
            c = C
    print(ans)

Failing test case input:
4 12 13

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 and b % 2 == 0 and c % 2 == 0:
        print(-1)
    else:
        print(0)
else:
    ans = 0
    while True:
        if a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
            ans += 1
            A = b / 2 + c / 2
            B = c / 2 + a / 2
            C = a / 2 + b / 2
            a = A
            b = B
            c = C
        else:
            break
    print(ans)
Problem: p03723
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
a, b, c = map(int, input().split())

total = a + b + c

if a % 2 == 0 and b % 2 == 0 and c % 2 == 0 and a == b == c:
    print(-1)
else:
    count = 1
    while True:
        a, b = (total - a) / 2, (total - b) / 2
        if a % 2 != 0 or b % 2 != 0:
            print(count)
            break
        else:
            count += 1


Failing test case input:
2680 18 6815

Expected output:
0


Actual output:
1


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

total = a + b + c

if a % 2 == 0 and b % 2 == 0 and c % 2 == 0 and a == b == c:
    print(-1)
elif a % 2 != 0 or b % 2 != 0 or c % 2 != 0:
    print(0)
else:
    count = 1
    while True:
        a, b = (total - a) / 2, (total - b) / 2
        if a % 2 != 0 or b % 2 != 0:
            print(count)
            break
        else:
            count += 1

Problem: p03723
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,C=map(int,input().split())
count=0
if A==B and A==C:
  print("-1")
  exit()
elif A%2==1 or B%2==1 or C%2==1:
  print("-1")
  exit()
while True:
  a,b,c=A/2,B/2,C/2
  A,B,C=b+c,a+c,a+b
  count+=1
  if A%2==1 or B%2==1 or C%2==1:
    break
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())
count=0
if A%2==0 and A==B and A==C:
  print("-1")
  exit()
while True:
  if A%2==1 or B%2==1 or C%2==1:
    break
  a,b,c=A/2,B/2,C/2
  A,B,C=b+c,a+c,a+b
  count+=1
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):
        if(A == a or B == b or C == c):
            print(-1)
            break
        i += 1
        a, b, c = A, B, C
        A = (b+c)/2
        B = (c+a)/2
        C = (a+b)/2
    else:
        if(A == a or B == b or C == c):
            print(-1)
            break
        print(i)
        break


Failing test case input:
4 12 13

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 (PyPy3 (2.4.0), verdict: Wrong Answer):
a, b, c = map(int, input().split())
if a == b == c:
  if a % 2 == 0:
    print(-1)
  else:
    print(1)
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:
1924 106 375

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.4.3), verdict: Wrong Answer):
a,b,c = map(int, input().split())
count = 0
if not a==b==c and a%2==0 and b%2==0 and c%2==0:
    while a%2==0 and b%2==0 and c%2==0:
        temp_a = a
        temp_b = b
        temp_c = c
        a += temp_b/2 + temp_c/2
        b += temp_a/2 + temp_c/2
        c += temp_a/2 + temp_b/2
        count+=1
    print(count)
else:
    print("-1")

Failing test case input:
0 35 -1

Expected output:
0


Actual output:
-1


Fixed submission (verdict: Accepted):
def ex(x):
    while x%2==0 and x>2:
        x/=2
    if x==2:
        return 0
    else:
        return 1
a,b,c = map(int, input().split())
count = 0
if not ex(a)==ex(b)==ex(c)==0:
    while a%2==0 and b%2==0 and c%2==0:
        temp_a = a
        temp_b = b
        temp_c = c
        a = temp_b/2 + temp_c/2
        b = temp_a/2 + temp_c/2
        c = temp_a/2 + temp_b/2
        count+=1
        if ex(a)==ex(b)==ex(c)==0 or a==b==c:
            count = -1
            break
    print(count)
else:
    print("-1")

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

Failing test case input:
17 25 13

Expected output:
0


Actual output:
2


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.8.2), verdict: Wrong Answer):
a,b,c=list(map(int,input().split()))
n=0
H=[]
while True:
  S=[a,b,c]
  if S in H:
    print("-1")
    exit()
  H.append(S)
  if a%2!=0 and b%2!=0 and c%2!=0:
    print(n)
    exit()
  else:
    A=a/4
    B=b/4
    C=c/4
    a=a/2+B+C
    b=b/2+A+C
    c=c/2+A+B
    n+=1

Failing test case input:
2 25 0

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
a,b,c=list(map(int,input().split()))
n=0
H=[]
while True:
  S=[a,b,c]
  if S in H:
    print("-1")
    exit()
  H.append(S)
  if a%2!=0 or b%2!=0 or c%2!=0:
    print(n)
    exit()
  else:
    A=a/2
    B=b/2
    C=c/2
    a=int(B+C)
    b=int(A+C)
    c=int(A+B)
    n+=1
Problem: p03723
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a, b, c = map(int, input().split())
a_tmp = a ; b_tmp = b ; c_tmp = c
count = 0
while True :
    count += 1
    a = b_tmp/2 + c_tmp/2
    b = a_tmp/2 + c_tmp/2
    c = a_tmp/2 + b_tmp/2
    if a == a_tmp and b == b_tmp and c == c_tmp :
        print("-1")
        break
    a_tmp = a ; b_tmp = b ; c_tmp = c
    if a%2 == 1 or b%2 == 1 or c%2 == 1 :
        print(count)
        break
    else :
        continue


Failing test case input:
1723 47 7744

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
a, b, c = map(int, input().split())
a_tmp = a ; b_tmp = b ; c_tmp = c
count = 0
while True :
    if a == b == c and a%2 == 0 :
        print("-1")
        break
    elif a%2 == 1 or b%2 == 1 or c%2 == 1 :
        print(count)
        break
    else :
        a = b_tmp/2 + c_tmp/2
        b = a_tmp/2 + c_tmp/2
        c = a_tmp/2 + b_tmp/2
        a_tmp = a ; b_tmp = b ; c_tmp = c
        count += 1

Problem: p03723
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
cookie = input('三人のクッキー枚数は？').split()
A,B,C = int(cookie[0]),int(cookie[1]),int(cookie[2])
kaisuu = 0
while A % 2 == 0 and B % 2 == 0 and C % 2 == 0:
    A,B,C = (B+C)/2,(A+C)/2,(A+B)/2
    if A == B and B == C and A % 2 == 0 and B % 2 == 0 and C % 2 == 0:
        kaisuu = -1
        break
    else:
        kaisuu += 1
print(kaisuu)

Failing test case input:
608 32 4674

Expected output:
1


Actual output:
三人のクッキー枚数は？1


Fixed submission (verdict: Accepted):
cookie = input().split()
A,B,C = int(cookie[0]),int(cookie[1]),int(cookie[2])
kaisuu = 0
while A % 2 == 0 and B % 2 == 0 and C % 2 == 0:
    A,B,C = (B+C)/2,(A+C)/2,(A+B)/2
    if A == B and B == C and A % 2 == 0 and B % 2 == 0 and C % 2 == 0:
        kaisuu = -1
        break
    else:
        kaisuu += 1
print(kaisuu)

Problem: p03723
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from sys import stdin
A,B,C = [int(x) for x in stdin.readline().rstrip().split()]

ans = 0

if A == B == C:
    if A % 2 == 0:
        ans = -1
    else:
        ans = 0
else:
    for _ in range(1000):
        ta = A
        tb = B
        tc = C
        A = (tb/2) + (tc/2)
        B = (ta/2) + (tc/2)
        C = (ta/2) + (tb/2)
        ans += 1
        if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:
            break
print(ans)

Failing test case input:
1390 180 2625

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
from sys import stdin
A,B,C = [int(x) for x in stdin.readline().rstrip().split()]

ans = 0

if A == B == C:
    if A % 2 == 0:
        ans = -1
    else:
        ans = 0
elif A % 2 == 1 or B % 2 == 1 or C % 2 == 1:
     ans = 0
else:
    for _ in range(1000):
        ta = A
        tb = B
        tc = C
        A = (tb/2) + (tc/2)
        B = (ta/2) + (tc/2)
        C = (ta/2) + (tb/2)
        ans += 1
        if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:
            break
        
print(ans)
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
        else:
            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:
454 414 1200

Expected output:
1


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 (PyPy3 (2.4.0), verdict: Wrong Answer):

a, b, c = [ int(v) for v in input().split() ]

if all([a==b,b==c]):
    print(-1)

else:
    t = 0
    while t< 10:
        a, b, c = map( int,[ b/2+c/2, c/2+a/2, a/2+b/2 ] )
        t += 1

        if not all([a%2==0,b%2==0,c%2==0]):
            print(t)
            break
        if all([a==b,b==c]):
            print(-1)
            break
        

Failing test case input:
-5 0 -3

Expected output:
0


Actual output:
1


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

if not all([a%2==0,b%2==0,c%2==0]):
    print(t)
elif all([a==b,b==c]):
    print(-1)


else:
    while True:
        a, b, c = map( int,[ b/2+c/2, c/2+a/2, a/2+b/2 ] )
        t += 1

        if not all([a%2==0,b%2==0,c%2==0]):
            print(t)
            break
        elif all([a==b,b==c]):
            print(-1)
            break

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*7):
  cou += 1
  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))
    break
  else:
    pass
print("-1")

Failing test case input:
6 0 13

Expected output:
0


Actual output:
0
-1


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.4.3), verdict: Wrong Answer):
a,b,c=list(map(int,input().split()))
ans=0
while 1:
	if a%2!=0 or b%2!=0 or c%2!=0:
		print(ans)
		break
	if a==b and b==c:
		print('-1')
		break
	a,b,c=(b+c)>>1,(a+c)>>1,(a+b)>>2
	ans+=1;

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()))
ans=0
while 1:
	if a&1 or b&1 or c&1:
		print(ans)
		break
	if a==b and b==c:
		print('-1')
		break
	ans+=1;
	d=(c+b)>>1
	e=(a+c)>>1
	f=(a+b)>>1
	a,b,c=d,e,f
Problem: p03723
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, C = map(int, input().split())
cnt = 0
flag_cnt=0
while(1):
    A_tmp = A
    B_tmp = B
    C_tmp = C
    A = (B_tmp+C_tmp)/2
    B = (A_tmp+C_tmp)/2
    C = (A_tmp+C_tmp)/2
    cnt += 1
    if A%2!=0 or B%2!=0 or C%2!=0:
        break
    if A_tmp==A and B_tmp==B and C_tmp==C:
        flag_cnt+=1
        if flag_cnt==2:
            cnt = -1
            break
print(cnt)

Failing test case input:
1090 27 7744

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
A, B, C = map(int, input().split())
cnt = 0
while(1):
    if A%2!=0 or B%2!=0 or C%2!=0:
        break
    A_tmp = A
    B_tmp = B
    C_tmp = C
    A = (B_tmp+C_tmp)/2
    B = (A_tmp+C_tmp)/2
    C = (A_tmp+C_tmp)/2
    cnt += 1
    if A_tmp==A and B_tmp==B and C_tmp==C:
        cnt = -1
        break
print(cnt)

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


def is_even(a, b, c):
    if a % 2 != 0:
        return False
    if b % 2 != 0:
        return False
    if c % 2 != 0:
        return False
    return True

count = 0
rem = []

flag = True

while is_even(a, b, c) and flag:
    if (a, b, c) in rem:
        print("-1")
        flag = False
        break
    a, b, c = (b + c) / 2, (a + c) / 2, (a + b) / 2
    count += 1
    rem.append((a, b, c))

if flag is True:
    print(count)


Failing test case input:
454 414 846

Expected output:
3


Actual output:
-1


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


def is_even(a, b, c):
    if a % 2 != 0:
        return False
    if b % 2 != 0:
        return False
    if c % 2 != 0:
        return False
    return True

count = 0
rem = []

flag = True

while is_even(a, b, c) and flag:
    a, b, c = (b + c) / 2, (a + c) / 2, (a + b) / 2
    count += 1
    if (a, b, c) in rem:
        print("-1")
        flag = False
        break
    rem.append((a, b, c))


if flag is True:
    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:
    print(-1)
else:
    ans=0
    flag=0
    d=0
    while flag==0:
        if (A>>d &1)==(B>>d &1) and (C>>d &1)==(B>>d &1):
            d+=1
        else:
            ans=d
            break
    print(ans)

Failing test case input:
17 25 13

Expected output:
0


Actual output:
2


Fixed submission (verdict: Accepted):
A,B,C=map(int,input().split())
if A==B and B==C and A%2==0:
    print(-1)
elif A%2==1 or B%2==1 or C%2==1:
    print(0)
else:
    ans=0
    flag=0
    d=0
    while flag==0:
        if (A>>d &1)==(B>>d &1) and (C>>d &1)==(B>>d &1):
            d+=1
        else:
            ans=d
            break
    print(ans)
Problem: p03723
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, C = map(int, input().split())
if A != B != C:
  D = 0
  while A%2 == 0 and B%2 == 0 and C%2 == 0:
    A = B/2 + C/2
    B = A/2 + C/2
    C = A/2 + B/2
    D += 1
  print(D)
else:
  print('-1')

Failing test case input:
1076 32 2408

Expected output:
2


Actual output:
1


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

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

print("-1")
exit()
while True:
  a,b,c=A/2,B/2,C/2
  A,B,C=b+c,a+c,a+b
  count+=1
  if A%2==1 or B%2==1 or C%2==1:
    break
print(count)

Failing test case input:
1556 106 7744

Expected output:
1


Actual output:
-1


Fixed submission (verdict: Accepted):
A,B,C=map(int,input().split())
count=0
if A%2==0 and A==B and A==C:
  print("-1")
  exit()
while True:
  if A%2==1 or B%2==1 or C%2==1:
    break
  a,b,c=A/2,B/2,C/2
  A,B,C=b+c,a+c,a+b
  count+=1
print(count)

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(-1)
        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:
0 4 -1

Expected output:
0


Actual output:
53


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):
def resolve():
    a, b, c = map(int, input().split())
    count = 0
    while True:
        _a = b / 2 + c / 2
        _b = a / 2 + c / 2
        _c = a / 2 + b / 2

        if [a, b, c] == [_a, _b, _c]:
            count = -1
            break
        else:
            count += 1
            if _a % 2 != 0 or _b % 2 != 0 or _c % 2 != 0:
                break
            a, b, c = _a, _b, _c

    print(count)


resolve()

Failing test case input:
1614 47 7744

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
def resolve():
    a, b, c = map(int, input().split())
    count = 0
    while True:
        if a % 2 != 0 or b % 2 != 0 or c % 2 != 0:
            break
        _a = b / 2 + c / 2
        _b = a / 2 + c / 2
        _c = a / 2 + b / 2

        if [a, b, c] == [_a, _b, _c]:
            count = -1
            break
        else:
            a, b, c = _a, _b, _c
            count += 1

    print(count)


resolve()
Problem: p03723
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
A,B,C = map(int,input().split())
count = 0
while A%2 == 0 and B%2 == 0 and C%2 == 0 and count < 10**5:
  A_copy = A
  B_copy = B
  A = (B+C)/2
  B =(A_copy+C)/2
  C = (A_copy+B_copy)/2
  count += 1
if count == 10**5-1:
  print(-1)
else:
  print(count)

Failing test case input:
14 14 14

Expected output:
-1

Actual output:
100000


Fixed submission (verdict: Accepted):
A,B,C = map(int,input().split())
count = 0
while A%2 == 0 and B%2 == 0 and C%2 == 0 and count < 10**5:
  A_copy = A
  B_copy = B
  A = (B+C)/2
  B =(A_copy+C)/2
  C = (A_copy+B_copy)/2
  count += 1
if count == 10**5:
  print(-1)
else:
  print(count)

Problem: p03723
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
ms = list(map(int,input().split()))
ans=0
if len(set(ms))==1 and ms[0]%2==0:
    print(-1)
else:
    while(not any([i%2==0 for i in ms])):
        l = [0]*3
        for i in range(3):
            x = ms[i]/2
            if i==0:
                l[1]+=x
                l[2]+=x
            elif i==1:
                l[0]+=x
                l[2]+=x
            elif i==2:
                l[0]+=x
                l[1]+=x
        ms = l[:]
        ans+=1
    print(ans)

Failing test case input:
1390 180 1200

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
ms = list(map(int,input().split()))
if len(set(ms))==1 and ms[0]%2==0:
    print(-1)
else:
    ans=0
    while(all([i%2==0 for i in ms])):
        l = [0]*3
        for i in range(3):
            x = ms[i]/2
            if i==0:
                l[1]+=x
                l[2]+=x
            elif i==1:
                l[0]+=x
                l[2]+=x
            elif i==2:
                l[0]+=x
                l[1]+=x
        ms = l[:]
        ans+=1
    print(ans)

Problem: p03723
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
A,B,C = map(int,input().split())
count = 0
while A%2 == 0 and B%2 == 0 and C%2 == 0 and count < 10**5:
  A_copy = A
  B_copy = B
  A = (B+C)/2
  B =(A_copy+C)/2
  C = (A_copy+B_copy)/2
  count += 1
print(count)

Failing test case input:
14 14 14

Expected output:
-1

Actual output:
100000


Fixed submission (verdict: Accepted):
A,B,C = map(int,input().split())
count = 0
while A%2 == 0 and B%2 == 0 and C%2 == 0 and count < 10**5:
  A_copy = A
  B_copy = B
  A = (B+C)/2
  B =(A_copy+C)/2
  C = (A_copy+B_copy)/2
  count += 1
if count == 10**5:
  print(-1)
else:
  print(count)
Problem: p03723
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from math import log2
a,b,c = map(int,input().split())
if a == b and b == c:
    print(-1)
else:
    ans = 1
    while True:
        A = b/2 + c/2
        B = a/2 + c/2
        C = a/2 + b/2
        if A % 2 != 0 or B % 2 != 0 or C % 2 != 0:
            break
        else:
            ans += 1
            a = A
            b = B
            c = C
    print(ans)

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 == b and b == c:
    if a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
        print(-1)
    else:
        print(0)
else:
    ans = 0
    while True:
        if a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
            ans += 1
            A = b / 2 + c / 2
            B = c / 2 + a / 2
            C = a / 2 + b / 2
            a = A
            b = B
            c = C
        else:
            break
    print(ans)

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

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

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:
1390 18 4202

Expected output:
2


Actual output:
1390 18 4202
2


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

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.4.3), verdict: Wrong Answer):
def resolve():
    a, b, c = map(int, input().split())
    count = 0
    while True:
        _a = b / 2 + c / 2
        _b = a / 2 + c / 2
        _c = a / 2 + b / 2

        if [a, b, c] == [_a, _b, _c]:
            count = -1
            break
        else:
            a, b, c = _a, _b, _c
            count += 1
            if a % 2 != 0 or b % 2 != 0 or c % 2 != 0:
                break
            
    print(count)


resolve()

Failing test case input:
-1 -2 1

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
def resolve():
    a, b, c = map(int, input().split())
    count = 0
    while True:
        if a % 2 != 0 or b % 2 != 0 or c % 2 != 0:
            break
        _a = b / 2 + c / 2
        _b = a / 2 + c / 2
        _c = a / 2 + b / 2

        if [a, b, c] == [_a, _b, _c]:
            count = -1
            break
        else:
            a, b, c = _a, _b, _c
            count += 1

    print(count)


resolve()

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

Failing test case input:
-5 -1 -4

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
a,b,c=map(int,input().split())
ta,ao,su=a,b,c
cnt=0
f=True
while f:
	if ta%2!=0 or ao%2!=0 or su%2!=0:
		f=False
	elif ta==ao==su:
		f=False
		cnt=-1
	else:
		ta=(b+c)/2
		ao=(a+c)/2
		su=(a+b)/2
		cnt+=1
		a=ta
		b=ao
		c=su
print(cnt)

Problem: p03723
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a=list(map(int,input().split()))
b=[0,0,0]
count=0
while a[0]%2==a[1]%2==a[2]%2==0 and not a[0]==a[1]==a[2]==0:
    b[0]=a[0]
    b[1]=a[1]
    b[2]=a[2]
    a[0]=a[0]+b[1]/2+b[2]/2
    a[1]=a[1]+b[0]/2+b[2]/2
    a[2]=a[2]+b[1]/2+b[0]/2
    count+=1
print(count)

Failing test case input:
14 14 14

Expected output:
-1

Actual output:
1021


Fixed submission (verdict: Accepted):
a=list(map(int,input().split()))
b=[0,0,0]
count=0
if a[0]==a[1]==a[2] and a[0]%2==0:
    print(-1)
else:
    while a[0]%2==a[1]%2==a[2]%2==0:
        b[0]=a[0]
        b[1]=a[1]
        b[2]=a[2]
        a[0]=b[1]/2+b[2]/2
        a[1]=b[0]/2+b[2]/2
        a[2]=b[1]/2+b[0]/2
        count+=1
    print(count)
Problem: p03723
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, C = [int(_) for _ in input().split()]
 
def solve(A, B, C):
    result = 0
    if A == B == C and A % 2 == 0 or B % 2 == 0 or C % 2 == 0:
        return -1
    while 1:
        if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:
            return result
        A, B, C = A/2+B/2, B/2+C/2, C/2+A/2
        result += 1

print(solve(A, B, C))


Failing test case input:
1614 47 7744

Expected output:
0


Actual output:
-1


Fixed submission (verdict: Accepted):
A, B, C = [int(_) for _ in input().split()]
 
def solve(A, B, C):
    result = 0
    if A == B == C and A % 2 == 0 and B % 2 == 0 and C % 2 == 0:
        return -1
    while 1:
        if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:
            return result
        A, B, C = A/2+B/2, B/2+C/2, C/2+A/2
        result += 1

print(solve(A, B, C))

Problem: p03723
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):

a, b, c = [ int(v) for v in input().split() ]

if all([a==b,b==c]):
    print(-1)

else:
    t = 0
    while True:
        a, b, c = map( int,[ b/2+c/2, c/2+a/2, a/2+b/2 ] )
        t += 1

        if not all([a%2==0,b%2==0,c%2==0]):
            print(t)
            break
        if all([a==b,b==c]):
            print(-1)
            break

Failing test case input:
4 12 13

Expected output:
0


Actual output:
3


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

if not all([a%2==0,b%2==0,c%2==0]):
    print(t)
elif all([a==b,b==c]):
    print(-1)


else:
    while True:
        a, b, c = map( int,[ b/2+c/2, c/2+a/2, a/2+b/2 ] )
        t += 1

        if not all([a%2==0,b%2==0,c%2==0]):
            print(t)
            break
        elif all([a==b,b==c]):
            print(-1)
            break

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

Failing test case input:
1076 32 4674

Expected output:
1


Actual output:
2353.0 2875.0 554.0
1


Fixed submission (verdict: Accepted):
A,B,C = map(int,input().split())
if A == B and  B == C and C == A:
  print(-1 if A%2==0 else 0 )
else:
  count = 0
  while(A%2==0 and B%2 == 0 and C%2==0):
    A_ = A
    B_ = B
    A = (B+C)/2
    B = (A_+C)/2
    C = (A_+B_)/2
    count+=1
  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
    if A == B == C:
        print(-1)
    else:
        while True:
            if (b + c) % 2 > 0 or (a + c) % 2 > 0 or (a + b) % 2 > 0:
                break
            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:
17 321 375

Expected output:
0


Actual output:
1


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.4.3), verdict: Wrong Answer):
*a, = map(int,input().split())
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 321 375

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

cnt = 0
if (a == b) and (b == c) and (a%2==0):
    print(-1)
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:
2 25 0

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):
from itertools import count
a,b,c=map(int,input().split())

for i in count(1):
  a,b,c=(b+c)/2,(a+c)/2,(a+b)/2
  if a==b==c:
    print(-1)
    break
  elif a%2 or b%2 or c%2:
    print(i)
    break

Failing test case input:
1592 67 6815

Expected output:
0


Actual output:
1


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

if a%2 or b%2 or c%2:
  print(0)
else:
  for i in count(1):
    a,b,c=(b+c)/2,(a+c)/2,(a+b)/2
    if a==b==c:
      print(-1)
      break
    elif a%2 or b%2 or c%2:
      print(i)
      break