Problem:


Score : 300 points

Problem Statement

Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below:

Each person simultaneously divides his cookies in half and gives one half to each of the other two persons.

This action will be repeated until there is a person with odd number of cookies in hand.

How many times will they repeat this action?
Note that the answer may not be finite.

Constraints

1 ≤ A,B,C ≤ 10^9

Input

Input is given from Standard Input in the following format:

A B C

Output

Print the number of times the action will be performed by the three people, if this number is finite.
If it is infinite, print -1 instead.

Sample Input 1

4 12 20

Sample Output 1

3

Initially, Takahashi, Aoki and Snuke have 4, 12 and 20 cookies. Then,

After the first action, they have 16, 12 and 8.

After the second action, they have 10, 12 and 14.

After the third action, they have 13, 12 and 11.

Now, Takahashi and Snuke have odd number of cookies, and therefore the answer is 3.

Sample Input 2

14 14 14

Sample Output 2

-1

Sample Input 3

454 414 444

Sample Output 3

1



Sample input:
4 12 20


Sample output:
3

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
a,b,c= map(int,input().split())
cnt = 0
if a == b and b == c:
    if a%2 == 0 and b%2 == 0 and c%2 == 0:
        print(-1)
        exit()
    else:
        print(0)
while a%2 == 0 and b%2 == 0 and c%2 == 0:
    cnt +=1
    x =(b+c)//2
    y =(c+a)//2
    z =(b+a)//2
    a = x
    b = y
    c = z
print(cnt)

Submission status: Wrong Answer

Solution code:
a,b,c= map(int,input().split())
cnt = 0
if a == b and b == c:
    print(-1)
    exit()
while a%2 == 0 and b%2 == 0 and c%2 == 0:
    cnt +=1
    x =(b+c)//2
    y =(c+a)//2
    z =(b+a)//2
    a = x
    b = y
    c = z
print(cnt)

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
d=0
if a==b==c and a%2==0:
    print(-1)
else:
    while a%2==0 and b%2==0 and c%2==0:
        a,b,c=(b+c),(a+c),(a+b)
        d+=1
print(d)

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
cna = cnb = 0
a.sort()
x = a[2]-a[1]
y = a[1]-a[0]
while True:
    if x%2 == 0 and x != 0:
        cna += 1
        x //= 2
    else:
        break
while True:
    if y%2 == 0 and y != 0:
        cnb += 1
        y //= 2
    else:
        break
if cna == 0 or cnb == 0:
    print(-1)
else:
    print(min(cna,cnb))

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
cna = cnb = 0
a.sort()
x = a[2]-a[1]
y = a[1]-a[0]
while True:
    if x%2 == 0 and x != 0:
        cna += 1
        x //= 2
    else:
        break
while True:
    if y%2 == 0 and y != 0:
        cnb += 1
        y //= 2
    else:
        break
if cna == 0 and cnb == 0:
    print(-1)
else:
    print(min(cna,cnb))

Submission status: Wrong Answer

Solution code:
"""Boot-camp-for-Beginners_Easy013_A_Candy-Distribution-Again_30-August-2020.py"""

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

Submission status: Wrong Answer

Solution code:
"""Boot-camp-for-Beginners_Easy013_A_Candy-Distribution-Again_30-August-2020.py"""

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

Submission status: Wrong Answer

Solution code:
"""Boot-camp-for-Beginners_Easy013_A_Candy-Distribution-Again_30-August-2020.py"""

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

Submission status: Wrong Answer

Solution code:
"""Boot-camp-for-Beginners_Easy013_A_Candy-Distribution-Again_30-August-2020.py"""

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

Submission status: Wrong Answer

Solution code:
"""Boot-camp-for-Beginners_Easy013_A_Candy-Distribution-Again_30-August-2020.py"""

A, B, C = map(int, input().split())

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

Submission status: Wrong Answer

Solution code:
A, B, C = map(int, input().split())
X = (A|B|C)^(A&B&C)
ans = (X&-X).bit_length()-1
print(ans)

Submission status: Wrong Answer

Solution code:
A, B, C = map(int, input().split())
count = 0
if A == B and B == C:
  print(-1)
  exit()

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
  count += 1
print(count)

Submission status: Wrong Answer

Solution code:
import sys
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 10 ** 9 + 7

a, b, c = LI()

# ABCの3人が持っているクッキーを交換する。
# 3人は同時に、手持ちのクッキーを半分割し、残りの二人にそれぞれ1方を渡すことを繰り返す。
# 誰かの持っているクッキーが奇数個になったら操作をやめる。
# クッキー交換は何回行うことができるか。無限に続けられることもある。

def distribute(a,b,c):
    x = a/2
    y = b/2
    z = c/2

    a2 = y + z
    b2 = x + z
    c2 = x + y

    if a == a2 and b == b2 and c == c2:
        print(-1)
        sys.exit()
    return a2, b2, c2

count = 0

while (a % 2 == 0) and (b % 2 == 0) and (c % 2 == 0):
    a, b, c = distribute(a, b, c)
    count += 1
    print(a, b, c)

print(count)

Submission status: Wrong Answer

Solution code:
import sys
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 10 ** 9 + 7

a, b, c = LI()

# ABCの3人が持っているクッキーを交換する。
# 3人は同時に、手持ちのクッキーを半分割し、残りの二人にそれぞれ1方を渡すことを繰り返す。
# 誰かの持っているクッキーが奇数個になったら操作をやめる。
# クッキー交換は何回行うことができるか。無限に続けられることもある。

def distribute(a,b,c):
    x = a/2
    y = b/2
    z = c/2

    a = y + z
    b = x + z
    c = x + y
    return a, b, c

count = 0
if a == b == c:
    print(-1)
    sys.exit()
while (a % 2 == 0) and (b % 2 == 0) and (c % 2 == 0):
    a, b, c = distribute(a, b, c)
    count += 1
    print(a, b, c)

print(count)

Submission status: Wrong Answer

Solution code:
a, b, c = map(int,input().split())
count = 0
def exchange(a, b, c, count):
    a, b, c = int((b+c)/2), int((a+c)/2), int((a+b)/2)
    count += 1
    if a % 2 != 0 or b % 2 != 0 or c % 2 != 0:
        return a, b, c, count
    else:
        return exchange(a, b, c, count)
if a == b == c:
    print("-1")
else:
    aa, bb, cc, count = exchange(a, b, c, count)
    print(count)

Submission status: Wrong Answer

Solution code:
ans = 0
A, B, C = map(int, input().split())
if A == B and A == C:
    print(-1)
else:
    while A % 2 == 0 and B % 2 == 0 and C % 2 == 0:
        A, B, C = B/2+C/2, C/2+A/2, A/2+B/2
        ans += 1
    print(ans)

Submission status: Wrong Answer

Solution code:
a, b, c = map(int, input().split()); i = 0
if a == b and b == c: print(-1)
else:
    while a%2 == 0 and b%2 == 0 and c%2 == 0:
        a, b, c = (b+c)//2, (c+a)//2, (a+b)//2; i += 1
    print(i)

Submission status: Wrong Answer

Solution code:
# import math
# import statistics
# import itertools
# a=int(input())
# b=input()
# c=[]
# for i in a:
#     c.append(int(i))
A,B,C= map(int,input().split())
# f = list(map(int,input().split()))
# g = [int(input()) for _ in range(N)]
# h = []
# for i in range(a):
#     h.append(list(map(int,input().split())))
# a = [[0] for _ in range(H)]#nizigen

nowA=A
nowB=B
nowC=C
count=0
if A==B==C:
    print(-1)
else:
    while True:
        nowA=B//2+C//2
        nowB=A//2+C//2
        nowC=A//2+B//2
        A=nowA
        B=nowB
        C=nowC
        count+=1
        if nowA%2==1 or nowB%2==1 or nowC%2==1:
            print(count)
            exit()

Submission status: Wrong Answer

Solution code:
A, B, C = map(int, input().split())
cnt = 0

if A == B and B == C:
  print(-1)
else:
  while True:
    if A%2!=0 or B%2!=0 or C%2!=0:
      print(cnt)
      break
    else:
      temp_A = A
      temp_B = B
      A = B/2 + C/2
      B = temp_A/2 + C/2
      C = temp_A/2 + temp_B/2
      cnt += 1

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
for i in range(500000):
    if a%2==1 or b%2==1 or c%2==1:
        print(i);exit()
else:
    print(-1)

Submission status: Wrong Answer

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

times = 0
if a == b and b == c:
    print(-1)
else:
    while 1:
        if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
            break
        a, b, c = int((b + c)/2), int((c + a)/2), int((a + b)/2)
        times += 1

    print(times)

Submission status: Wrong Answer

Solution code:
ABC = list(map(int, input().split()))

cnt = 1

if ABC[0] == ABC[1] == ABC[2]:
    print(-1)
    exit()
else:
    while True:
        ABC[0], ABC[1], ABC[2] = (ABC[1]+ABC[2])//2, (ABC[0]+ABC[2])//2, (ABC[0]+ABC[1])//2
        if ABC[0]%2 == ABC[1]%2 == ABC[2]%2 == 0:
            cnt += 1
        else:
            break
 
print(cnt)

Submission status: Wrong Answer

Solution code:
# -*- coding:utf-8 -*-
A,B,C = map(int,input().split())

cnt = 0

if A==B==C:
    cnt = -1
else:
    while A%2 == 0 and B%2 == 0 and C%2 == 0:
        A,B,C = (B+C)//2,(C+A)//2,(A+B)//2 
        cnt += 1

print(cnt)

Submission status: Wrong Answer

Solution code:
import sys
import copy
a = [int(c) for c in input().split()]
cnt=0
while True:
    if a[0]==a[1] and a[1]==a[2]:
        print(-1)
        sys.exit(0)
    
    if a[0]%2 == 0 and a[1]%2 == 0 and a[2]%2 == 0:
        b = copy.deepcopy(a)
        a[0] = int((b[1]+b[2])/2)
        a[1] = int((b[2]+b[0])/2)
        a[2] = int((b[0]+b[1])/2)
    else:
        print(cnt)
        sys.exit(0)

    cnt+=1

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split());print(len(bin((e:=a-b|b-c)&-e))-3or~a%-2)

Submission status: Wrong Answer

Solution code:
*l, = map(int, input().split())

ans = 0
while True:
    a = (l[1] + l[2]) // 2
    b = (l[0] + l[2]) // 2
    c = (l[0] + l[1]) // 2
    if l == [a, b, c]:
        ans = -1
        break
    l = [a, b, c]
    ans += 1
    if a%2 or b%2 or c%2:
        break

print(ans)

Submission status: Wrong Answer

Solution code:
#-*-coding:utf-8-*-
import sys
input=sys.stdin.readline

def main():
    a,b,c = map(int,input().split())
    count=0
    while True:
        if a == b ==c:
            print(-1)
            exit()
        elif a % 2 ==0 and b % 2==0 and c % 2 ==0:
            tmp_a=a/2
            tmp_b=b/2
            tmp_c=c/2
            a=tmp_b+tmp_c
            b=tmp_a+tmp_c
            c=tmp_b+tmp_a
            count+=1
        else:
            break
    print(count)

if __name__=="__main__":
    main()

Submission status: Wrong Answer

Solution code:
#-*-coding:utf-8-*-
import sys
input=sys.stdin.readline

def main():
    a,b,c = map(int,input().split())
    count=0
    while True:
        if a == b and b==c and c==a:
            print(-1)
            exit()
        elif a % 2 ==0 and b % 2==0 and c % 2 ==0:
            tmp_a=a/2
            tmp_b=b/2
            tmp_c=c/2
            a=tmp_b+tmp_c
            b=tmp_a+tmp_c
            c=tmp_b+tmp_a
#            print("a={},b={},c={}".format(a,b,c))
            count+=1
        else:
            break
    print(count)

if __name__=="__main__":
    main()

Submission status: Wrong Answer

Solution code:
cookies = list(map(int, input().split()))

ans = 0

def odd_even(num_list):
    num = 'even'
    for n in num_list:
        if n % 2 == 1:
            num = 'odd'
            break
    return num

def change_cookie(cookie_list):
    cookie_list_after = []
    for c in cookie_list:
        cookie_list_after.append(int(sum(cookie_list) - c) / 2)
    return cookie_list_after

print(odd_even(change_cookie(cookies)))
while True:
    if odd_even(cookies) == 'even':
        cookies = change_cookie(cookies)
        ans += 1
    else:
        break
print(ans)

Submission status: Wrong Answer

Solution code:
# A - Cookie Exchanges
a,b,c = map(int,input().split())

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

Submission status: Wrong Answer

Solution code:
# A - Cookie Exchanges
a,b,c = map(int,input().split())
INF = 10000

def div2(x):
    ans = 0
    if x==0:
        return INF
    while x%2==0:
        ans += 1
        x //= 2
    return ans

ans = min(div2(abs(b-a)), div2(abs(c-b)), div2(abs(a-c)))
print(ans if ans<INF else -1)

Submission status: Wrong Answer

Solution code:
# A - Cookie Exchanges
a,b,c = map(int,input().split())
INF = 10000

def div2(x):
    ans = 0
    if x==0:
        return INF
    while x%2==0:
        ans += 1
        x //= 2
    return ans

ans = min(div2(abs(b-a)), div2(abs(c-b)))
print(ans if ans<INF else -1)

Submission status: Wrong Answer

Solution code:
a,b,c = map(int,input().split())
ans = 0
if a == b and b == c:
  ans = -1
else:
  while a%2 != 1 and b%2 != 1 and c%2 != 1:
    aa = b/2 + c/2
    bb = c/2 + a/2
    cc = a/2 + b/2
    a = int(aa)
    b = int(bb)
    c = int(cc)
    ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
def main():
  a,b,c = map(int,input().split())
  s = [a,b,c]
  if a == b and b == c:
    return -1

  cnt = 0
  while (a % 2 == 0) and (b % 2 == 0) and (c % 2 == 0):
    
    a1,b1,c1 = a,b,c
    a = (b1+c1)//2
    b = (a1+c1)//2
    c = (a1+b1)//2
    
    if [a,b,c] == s:
      return -1
    
    cnt += 1
    #print(a,b,c)
    
  return cnt    
    

ans = main()
print(ans)

Submission status: Wrong Answer

Solution code:
def main():
  A,B,C = map(int,input().split())
  s = [A,B,C]
  a,b,c = A,B,C
  if a == b and b == c:
    return -1

  cnt = 0
  while (a % 2 == 0) and (b % 2 == 0) and (c % 2 == 0):
    a1,b1,c1 = a,b,c
    a = (b1+c1)/2
    b = (a1+c1)/2
    c = (a1+b1)/2
    cnt += 1
    #print(a,b,c)
    if [a,b,c] == s:
      return -1
    
  return cnt    
    

ans = main()
print(ans)

Submission status: Wrong Answer

Solution code:
A,B,C = map(int,input().split())
s = [A,B,C]

def main(a,b,c):
  if a == b and b == c:
    return -1

  cnt = 0
  while (a % 2 == 0) and (b % 2 == 0) and (c % 2 == 0):
    a1,b1,c1 = a,b,c
    a = (b1+c1)/2
    b = (a1+c1)/2
    c = (a1+b1)/2
    cnt += 1
    #print(a,b,c)
    if [a,b,c] == s:
      return -1
    
  return cnt    
    

ans = main(A,B,C)
print(ans)

Submission status: Wrong Answer

Solution code:
A,B,C = map(int,input().split())

def main(a,b,c):
  if a == b and b == c:
    return -1
  if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
      return 0   
  
  cnt = 0
  while True:
    #print(a,b,c)
    a1,b1,c1 = a,b,c
    a = (b1+c1)//2
    b = (a1+c1)//2
    c = (a1+b1)//2
    cnt += 1
    if [a,b,c] == [A,B,C]:
      return -1
    if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
      return cnt    
    

ans = main(A,B,C)
print(ans)

Submission status: Wrong Answer

Solution code:
A,B,C = map(int,input().split())

def main(a,b,c):
  if a == b and b == c:
    return -1
  if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
      return 0   
  
  cnt = 0
  while True:
    #print(a,b,c)
    a1,b1,c1 = a,b,c
    a = (b1+c1)//2
    b = (a1+c1)//2
    c = (a1+b1)//2
    cnt += 1
    if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
      return cnt    
    

ans = main(A,B,C)
print(ans)

Submission status: Wrong Answer

Solution code:
A,B,C = map(int,input().split())

def main(a,b,c):
  if a == b and b == c:
    return -1
  
  cnt = 0
  while True:
    #print(a,b,c)
    a1,b1,c1 = a,b,c
    a = (b1+c1)//2
    b = (a1+c1)//2
    c = (a1+b1)//2
    cnt += 1
    if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
      return cnt    
    

ans = main(A,B,C)
print(ans)

Submission status: Wrong Answer

Solution code:
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)
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)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
A,B,C =map(int,input().split())
con = 0
 
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)

Submission status: Wrong Answer

Solution code:
A, B, C = map(int, input().split())

if A==B==C:
  print(-1)
else:
  count = 0
  while A%2==0 and B%2==0 and C%2==0:
    a = (B+C)//2
    b = (A+C)//2
    c = (A+B)//2
    A = a
    B = b
    C = c
    count += 1
  print(count)

Submission status: Wrong Answer

Solution code:
A,B,C =map(int,input().split())
con = 0
if A == B and B == C:
  print(-1)
  exit()
while True:
  if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:
    break
  con += 1
  D = A / 2
  E = B / 2
  F = C / 2
  A = E + F
  B = D + F
  C = D + E
  
print(con)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
import sys
A, B, C = [int(x) for x in input().split()]
ans = 0
if(A==B)and(B==C):
  print(-1)
  sys.exit()
while (A%2==0)and(B%2==0)and(C%2==0):
  a = B/2 + C/2
  b = C/2 + A/2
  c = A/2 + B/2
  A, B, C = a, b, c
  ans += 1
print(ans)

Submission status: Wrong Answer

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

if a==b==c:
    print(-1)
else:
    ans = 0
    while True:
        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)
        ans += 1
    print(ans)

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
if a==b==c:
    print(-1)
elif a%2!=0 or b%2!=0 or c%2!=0:
    print(0)
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

Submission status: Wrong Answer

Solution code:
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

Submission status: Wrong Answer

Solution code:
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

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
if a==b==c:
    print(-1)
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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
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:
  cnt=0
  d=a
  e=b
  f=c
  while d%2==0 and e%2==0 and f%2==0:
    d=(e+f)/2
    e=(f+d)/2
    f=(d+e)/2
    cnt+=1 
  print(cnt)

Submission status: Wrong Answer

Solution code:
li = list(map(int,input().split()))
nx = [0,0,0]
ans = 0
if any(x&1 for x in li) and li[0] == li[1] == li[2]:
    print(-1)
else:
    while 1:
        if(li[0]%2!=0 or li[1]%2!=0 or li[2]%2!=0):
            break
        nx[0] = (li[1] + li[2])/2
        nx[1] = (li[0] + li[2])/2
        nx[2] = (li[0] + li[1])/2
        li = nx.copy()
        ans += 1
    print(ans)

Submission status: Wrong Answer

Solution code:
li = list(map(int,input().split()))
nx = [0,0,0]
ans = 0
if(li[0] == li[1] == li[2] and (li[0]+li[1])%2==0 and (li[0]+li[1])%2==0 ):
    print(-1)
else:
    while 1:
        if(li[0]%2!=0 or li[1]%2!=0 or li[2]%2!=0):
            break
        nx[0] = (li[1] + li[2])/2
        nx[1] = (li[0] + li[2])/2
        nx[2] = (li[0] + li[1])/2
        li = nx.copy()
        ans += 1
    print(ans)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

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

ans=0
if a==b==c:
  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)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
A, B, C = list(map(int, input().split()))

if A == B == C:
    print(-1)
    exit()

ans = 0
while not any(n % 2 == 1 for n in [A, B, C]):
    A, B, C = (A + B) // 2, (B + C) // 2, (C + A) // 2
    ans += 1

print(ans)

Submission status: Wrong Answer

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

if a == b == c:
  print(-1)
  exit()
  
result = 0

while True:
  if any([a & 1, b & 1, c & 1]):
    break
    
  a2 = a // 2
  b2 = b // 2
  c2 = c // 2
  a = b2 + c2
  b = a2 + c2
  c = a2 + b2
  result += 1

print(result)

Submission status: Wrong Answer

Solution code:
A, B, C = map(int,input().split())

empty = [0] * 3
count = 0
if (A == B == C):
    print(-1) 
elif (A % 2 != 0) or (B % 2 != 0) or (C % 2 != 0):
    print(0)
else:
    while A % 2 == 0 and B % 2 == 0 and C % 2 == 0: 
        count += 1
        A_ = A//2
        B_ = B//2
        C_ = C//2
        A = B_ + C_
        B = A_ + C_
        C = A_ + B_

    print(count)

Submission status: Wrong Answer

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

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

times=0
while a%2==0 and b%2==0 and c%2==0:
    times+=1
    a_=a//2
    b_=b//2
    c_=c//2
    a=b_+c_
    b=a_+c_
    c=a_+b_

print(times)

Submission status: Wrong Answer

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

if a==b==c:
    print(-1)
    exit()

times=0
while a%2==0 and b%2==0 and c%2==0:
    times+=1
    a_=a//2
    b_=b//2
    c_=c//2
    a=b_+c_
    b=a_+c_
    c=a_+b_

print(times)

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
if a==b==c:
    print(-1)
    exit()
ans=0
while a%2==b%2==c%2==0:
    x=(a+b)//2
    y=(b+c)//2
    z=(c+a)//2
    a=y
    b=z
    c=a
    ans+=1
print(ans)

Submission status: Wrong Answer

Solution code:
import sys

input = sys.stdin.readline


def main():
    A, B, C = map(int, input().split())

    if A == B == C:
        print(-1)
        exit()

    ans = 0
    while True:
        if (A % 2 == 1) or (B % 2 == 1) or (C % 2 == 1):
            break
        ans += 1
        A, B, C = (B + C) // 2, (A + C) // 2, (A + B) // 2

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
a, b, c = map(int, input().split())
t = 0
if a == b == c:
  print('-1')

else:
  while (a % 2 + b % 2 + c % 2) == 0:
    a, b, c = (b + c) / 2, (a + c) / 2, (a + b) / 2
    t += 1

  print(t)

Submission status: Wrong Answer

Solution code:
a, b, c = map(int, input().split())
t = 0
if a == b == c:
  print(-1)

else:
  while (a % 2 + b % 2 + c % 2) == 0:
    a, b, c = (b + c) / 2, (a + c) / 2, (a + b) / 2
    t += 1

  print(t)

Submission status: Wrong Answer

Solution code:
a, b, c = map(int, input().split())
if a == b and b == c:
    print(-1)
else:
    count = 0
    while a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
        a, b, c = (b + c) // 2, (c + a) // 2, (a + b) // 2
        count += 1
    print(count)

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
if a==b and b==c:
    ans=-1
for i in range(1,1000000000):
    x=a//2
    y=b//2
    z=c//2
    a=y+z
    b=x+z
    c=x+y
    if a%2==1 or b%2==1 or c%2==1:
        ans=i
        break
print(ans)

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
if a==b and b==c:
    ans=-1
for i in range(1,100000):
    x=a//2
    y=b//2
    z=c//2
    a=y+z
    b=x+z
    c=x+y
    if a%2==1 or b%2==1 or c%2==1:
        ans=i
        break
print(ans)

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
ans=-1
for i in range(1,10000):
    x=a//2
    y=b//2
    z=c//2
    a=y+z
    b=x+z
    c=x+y
    print("{}-{}-{}".format(a,b,c))
    if a%2==1 or b%2==1 or c%2==1:
        ans=i
        break
print(ans)

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
if a==b and a==c:
    ans=-1
for i in range(1,100000):
    x=a//2
    y=b//2
    z=c//2
    a=y+z
    b=x+z
    c=x+y
    print("{}-{}-{}".format(a,b,c))
    if a%2==1 or b%2==1 or c%2==1:
        ans=i
        break
print(ans)

Submission status: Wrong Answer

Solution code:
def main():
    A, B, C = map(int, input().split())

    ans = 0
    if (2 * A - B - C) == 0 and (2 * B - A - C) == 0 and (2 * C - A - B) == 0:
        print(-1)
    else:
        while True:
            if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:
                print(ans)
                exit()

            A, B, C = (B + C)//2, (A + C)//2, (A + B)//2
            ans += 1

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
def main():
    A, B, C = map(int, input().split())

    ans = 0
    if (2 * A - B - C) == 0 and (2 * B - A - C) == 0 and (2 * C - A - B) == 0:
        print(-1)
    else:
        for i in range(10**9):
            if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:
                print(ans)
                exit()

            A, B, C = (B + C)//2, (A + C)//2, (A + B)//2
            ans += 1

if __name__ == "__main__":
    main()