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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
#from math import gcd
import bisect
from collections import defaultdict
from collections import deque
from collections import Counter
from functools import lru_cache


#############
# Constants #
#############

MOD = 10**9+7
INF = float('inf')

#############
# Functions #
#############

######INPUT######
def I(): return int(input().strip())
def S(): return input().strip()
def IL(): return list(map(int,input().split()))
def SL(): return list(map(str,input().split()))
def ILs(n): return list(int(input()) for _ in range(n))
def SLs(n): return list(input().strip() for _ in range(n))
def ILL(n): return [list(map(int, input().split())) for _ in range(n)]
def SLL(n): return [list(map(str, input().split())) for _ in range(n)]

######OUTPUT######
def P(arg): print(arg); return
def Y(): print("Yes"); return
def N(): print("No"); return
def E(): exit()
def PE(arg): print(arg); exit()
def YE(): print("Yes"); exit()
def NE(): print("No"); exit()

#####Shorten#####
def DD(arg): return defaultdict(arg)


#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

######Factorization######
def factorization(n):
  arr = []
  temp = n
  for i in range(2, int(-(-n**0.5//1))+1):
    if temp%i==0:
      cnt=0
      while temp%i==0: 
        cnt+=1 
        temp //= i
      arr.append([i, cnt])
  if temp!=1:
    arr.append([temp, 1])
  if arr==[]:
    arr.append([n, 1])
  return arr

#####MakeDivisors######
def make_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i: 
        divisors.append(n//i)
  return divisors

#####MakePrimes######
def make_primes(N):
  max = int(math.sqrt(N))
  seachList = [i for i in range(2,N+1)]
  primeNum = []
  while seachList[0] <= max:
    primeNum.append(seachList[0])
    tmp = seachList[0]
    seachList = [i for i in seachList if i % tmp != 0]
  primeNum.extend(seachList)
  return primeNum

#####GCD#####
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

#####LCM#####
def lcm(a, b):
    return a * b // gcd (a, b)

#####BitCount#####
def count_bit(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count

#####ChangeBase#####
def base_10_to_n(X, n):
  if X//n:
    return base_10_to_n(X//n, n)+[X%n]
  return [X%n]

def base_n_to_10(X, n):
  return sum(int(str(X)[-i-1])*n**i for i in range(len(str(X))))

#####IntLog#####
def int_log(n, a):
  count = 0
  while n>=a:
    n //= a
    count += 1
  return count

#############
# Main Code #
#############
A,B,C = IL()

count = 0
while max(A,B,C)-min(A,B,C) > 0:
  if not(A%2 == B%2 == C%2 == 0):
    break
  A,B,C = (B+C)//2,(A+C)//2,(A+B)//2
  count += 1
  

if A==B==C:
  print(-1)
else:
  print(count)

Submission status: Wrong Answer

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

count = 0

if a == b == c:
    print(-1)
else: 
    for _ in range(1000000):
        
        _a, _am = divmod(a, 2)
        _b, _bm = divmod(b, 2)
        _c, _cm = divmod(c, 2)

        if _am or _bm or _cm:
            print(count)
            break
        else:
            a = _b + _c
            b = _a + _c
            c = _a + _b
            count += 1
    else:
        print(-1)

Submission status: Wrong Answer

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

count = 0

if a == b == c:
    print(-1)
else: 
    for _ in range(100000):
        
        _a, _am = divmod(a, 2)
        _b, _bm = divmod(b, 2)
        _c, _cm = divmod(c, 2)

        if _am or _bm or _cm:
            print(count)
            break
        else:
            a = _b + _c
            b = _a + _c
            c = _a + _b
            count += 1
    else:
        print(-1)

Submission status: Wrong Answer

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

count = 0

if a == b == c:
    print(-1)
else: 
    for _ in range(100000):
        
        _a, _am = divmod(a, 2)
        _b, _bm = divmod(b, 2)
        _c, _cm = divmod(c, 2)

        if _am or _bm or _cm:
            print(count)
            break
        else:
            a = _b + _c
            b = _a + _c
            c = _a + _b
            count += 1

Submission status: Wrong Answer

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

count = 0

if a == b == c:
    print(-1)
else: 
    for _ in range(10000):
        
        _a, _am = divmod(a, 2)
        _b, _bm = divmod(b, 2)
        _c, _cm = divmod(c, 2)

        if _am or _bm or _cm:
            print(count)
            break
        else:
            a = _b + _c
            b = _a + _c
            c = _a + _b
            count += 1

Submission status: Wrong Answer

Solution code:
A, B, C = map(int, input().split())
cnt = 0
while True:
    if A == B and A == C:
        print(-1)
        break
    elif A % 2 != 0 or B % 2 != 0 or C % 2 != 0:
        print(cnt)
        break
    else:
        A, B, C = (B+C)//2, (C+A)//2, (A+B)//2
        cnt += 1

Submission status: Wrong Answer

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

cnt = 0

while True:

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

    lis = []
    lis.append((b+c)/2)
    lis.append((a+c)/2)
    lis.append((a+b)/2)
    a, b, c = lis

    cnt += 1

Submission status: Wrong Answer

Solution code:
a,b,c = map(int,input().split())
for i in range(600):
  if a == b and b == c:
    break
  a,b,c = a//2, b//2, c//2
  a, b, c = b + c, a + c, a + b
ans = i if i < 600 else -1
print(ans)

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:
  if a == b and b == c:
    break
  else:
    aDummy = a/2
    bDummy = b/2
    cDummy = c/2
    a = (bDummy) + (cDummy)
    b = (aDummy) + (cDummy)
    c = (aDummy) + (bDummy)
    count += 1
print(-1 if a == b and b == c else count)

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
num1=0
num2=0
num3=0
if a==b and b==c:
    print(-1)
else:
    for i in range(a*b*c):
        if a%2==1 or b%2==1 or c%2==1:
            break
        num1=a//2
        num2=b//2
        num3=c//2
        a=num2+num3
        b=num3+num1
        c=num1+num2
    print(i)

Submission status: Wrong Answer

Solution code:
def resolve():
    A, B, C = list(map(int, input().split()))
    if (A % 2 == 0 and B % 2 == 0 and C % 2 == 0):
        if (A == B and B == C and C == A):
            print(-1)
            return

    if (A % 2 == 1 and B % 2 == 1 and C % 2 == 1):
        print(0)
        return

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

    return


resolve()

Submission status: Wrong Answer

Solution code:
def resolve():
    A, B, C = list(map(int, input().split()))
    if (A == B and B == C and C == A):
        if (A % 2 == 0 and B % 2 == 0 and C % 2 == 0):
            print(-1)
        else:
            print(0)
        return

    if (A % 2 == 1 and B % 2 == 1 and C % 2 == 1):
        print(0)
        return

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

    return


resolve()

Submission status: Wrong Answer

Solution code:
def resolve():
    A, B, C = list(map(int, input().split()))
    if (A == B and B == C and C == A):
        if (A % 2 == 0 and B % 2 == 0 and C % 2 == 0):
            print(-1)
        else:
            print(0)
        return

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

    return
resolve()

Submission status: Wrong Answer

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

import sys
sys.setrecursionlimit(10**6)

def solve(a,b,c,counter=0):
    if a == b == c:
        return -1
    elif a % 2 != 0 or b % 2 != 0 or c % 2 != 0:
        return counter
    else:
        return solve((b+c)//2,(c+a)//2,(a+b)//2,counter+1)


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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b, c = map(int,input().split())
ans = 0
l = [a]

while True:
    ans += 1
    x = b//2 + c//2
    y = a//2 + c//2
    z = a//2 + b//2
    if x%2 == 1 or y%2 == 1 or z%2 == 1:
        break
    else:
        a = x
        if a in l:
            print(-1)
            exit()
        else:
            l.append(a)
            b = y
            c = z

print(ans)

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==B%2==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==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)

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 True:
    if A%2 or B%2 or C%2:
        print(cnt)
        break
    temp_a = A//2
    temp_b = B//2
    temp_c = C//2
    A += 2*temp_a + temp_b + temp_c
    B += 2*temp_b + temp_a + temp_c
    C += 2*temp_c + temp_a + temp_b
    cnt += 1

Submission status: Wrong Answer

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

if (A == B == C) and A%2 == 1:
    print(1)
else:
    base = min(A,B,C)

    A -= base
    B -= base
    C -= base

    def dividable_by_two(N):
        ans = 0
        if N ==0:
            return 0
        else:
            while 1:
                if N%2 !=0:
                    return ans
                else:
                    N /= 2
                    ans += 1

    if A == B == C:
        print(-1)
    else:
        ans = 2**100000
        for M in [A,B,C]:
            if M!=0:
                ans=min(ans,dividable_by_two(M))
        
        if ans == 2**100000:
            print(0)
        else:
            print(ans)

Submission status: Wrong Answer

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

count = 0
while (A % 2, B % 2, C % 2) == (0, 0, 0):
    A, B, C = (B + C) // 2, (A + C) // 2, (A + B) // 2
    count += 1

print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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:
        aa, bb, cc = a, b, c
        a = bb // 2 + cc // 2
        b = aa // 2 + cc // 2
        c = aa // 2 + bb // 2
        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:
        aa, bb, cc = a, b, c
        a = (bb + cc) // 2
        b = (aa + cc) // 2
        c = (aa + bb) // 2
        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)
elif not (a % 2 == 0 and b % 2 == 0 and c % 2 == 0):
    print(ans)
else :
    while a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
        aa, bb, cc = a, b, c
        a = (bb + cc) / 2
        b = (aa + cc) / 2
        c = (aa + bb) / 2
        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:
        aa, bb, cc = a, b, c
        a = (bb + cc) / 2
        b = (aa + cc) / 2
        c = (aa + bb) / 2
        ans += 1
    print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B, C = map(int, input().strip().split())
def f(a):
  if a % 4 == 0:
    return 2
  elif a % 2 == 0:
    return 1
  else:
    return 0

if f(A) == 0 or f(B) == 0 or f(C) == 0:
  print(0)
elif f(A) == 1 or f(B) == 1 or f(C) == 1:
  print(1)
else:
  print(-1)

Submission status: Wrong Answer

Solution code:
A,B,C = map(int,input().split())
if A*2 == B+C and B*2 == A+C and C*2 == A+B:
    print(-1)
    exit()
ans = 0
for i in range(10000):
    a = A//2
    b = B//2
    c = C//2
    if A%2 == 0 and B%2 == 0 and C%2 == 0:
        ans += 1
        A = b+c
        B = a+c
        C = a+b
    else:
        print(ans)
        exit()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b,c = map(int, input().split())
print(min(bin(abs(a-b))[::-1].find('1'),bin(abs(b-c))[::-1].find('1')))

Submission status: Wrong Answer

Solution code:
a,b,c = map(int, input().split())
print(min(bin(abs(a-b))[::-1].rfind('1'),bin(abs(a-b))[::-1].rfind('1')))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def resolve():
    A,B,C = map(int,input().split())
    count = 0
    if A == C and A == B and A % 2 == 1:
        print(-1)
    else:
        while (A % 2 == 0 and B % 2 == 0 and C % 2 == 0):
            tmpA = (B + C) / 2 
            tmpB = (A + C) / 2 
            tmpC = (A + B) / 2
            A = tmpA
            B = tmpB
            C = tmpC
            count = count + 1
        print(count)
resolve()

Submission status: Wrong Answer

Solution code:
def resolve():
    A,B,C = map(int,input().split())
    count = 0
    if A + B == 2*C and A + C == 2*B:
        print(-1)
    else:
        while (A % 2 == 0 and B % 2 == 0 and C % 2 == 0):
            tmpA = (B + C) / 2 
            tmpB = (A + C) / 2 
            tmpC = (A + B) / 2
            A = tmpA
            B = tmpB
            C = tmpC
            count = count + 1
        print(count)
resolve()

Submission status: Wrong Answer

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

if A==B==C:
    print('-1')
elif A%2==1 or B%2==1 or C%2==1:
    print(0)
else:
    cnt = 0

    flag = True
    while flag:
        A, B, C = (B+C)//2, (A+C)//2, (A+B)//2
        cnt += 1
        if A%2==0 and B%2==0 and C%2==0:    
            continue
        else:
            flag = False

    print(cnt)

Submission status: Wrong Answer

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

if A==B==C:
    print('-1')
else:
    cnt = 0

    flag = True
    while flag:
        A, B, C = (B+C)//2, (A+C)//2, (A+B)//2
        cnt += 1
        if A%2==0 and B%2==0 and C%2==0:    
            continue
        else:
            flag = False

    print(cnt)

Submission status: Wrong Answer

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

if A==B==C:
    print('-1')
else:
    cnt = 0

    flag = True
    while flag:
        A, B, C = (B+C)/2, (A+C)/2, (A+B)/2
        cnt += 1
        if A%2==0 and B%2==0 and C%2==0:    
            continue
        else:
            flag = False

    print(cnt)

Submission status: Wrong Answer

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

if A==B==C:
    print('-1')
else:
    cnt = 0

    flag = True
    while flag:
        A, B, C=(B+C)/2, (A+C)/2, (A+B)/2
        cnt += 1
        if A%2==0 and A%2==0 and A%2==0:    
            continue
        else:
            flag = False

    print(cnt)

Submission status: Wrong Answer

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

def even(a):
	if a % 2 == 0:
		return True
	else:
		return False

cnt = 0
if A == B and B == C:
	cnt = -1

elif not (even(A) and even(B) and even(C)):
		cnt = 0

else:
	cnt = 0
	while even(A) and even(B) and even(C):
		tmp1, tmp2, tmp3 = A,B,C
		A = (tmp2+tmp3) // 2
		B = (tmp3+tmp1) // 2
		C = (tmp1+tmp2) // 2
		cnt += 1

print(cnt)

Submission status: Wrong Answer

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

def even(a):
	if a % 2 == 0:
		return True
	else:
		return False

if A == B and B == C:
	print("-1")
	
elif not (even(A) and even(B) and even(C)):
		print("0")

else:
	cnt = 0
	while even(A) and even(B) and even(C):
		tmp1, tmp2, tmp3 = A,B,C
		A = (tmp2+tmp3) // 2
		B = (tmp3+tmp1) // 2
		C = (tmp1+tmp2) // 2
		cnt += 1
	print(cnt)

Submission status: Wrong Answer

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

def even(a):
	if a % 2 == 0:
		return True
	else:
		return False

if A == B and B == C:
	print("-1")
else:
	cnt = 0
	while even(A) and even(B) and even(C):
		tmp1, tmp2, tmp3 = A,B,C
		A = (tmp2+tmp3) // 2
		B = (tmp3+tmp1) // 2
		C = (tmp1+tmp2) // 2
		cnt += 1
	print(cnt)

Submission status: Wrong Answer

Solution code:
l = list(map(int, input().split()))
ans = 0
if l[0]==l[1]and l[1]==l[2]:
    ans = -1
else:
    while(True):
        if l[0]%2!=0 or l[1]%2!=0 or l[2]%2!=0:
            break
        else:
            a = l[0]
            b = l[1]
            c = l[2]
            l[0]=(b+c)/2
            l[1]=(a+c)/2
            l[2]=(a+b)/2
            ans+=1   
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

def dibidable_by_two(N):
    ans = 0
    if N ==0:
        return 0
    else:
        while 1:
            if N%2 !=0:
                return ans
            else:
                N /= 2
                ans += 1

if A == B == C:
    print(-1)
else:
    ans = 2**100000
    for M in [A,B,C]:
        if M!=0:
            ans=min(ans,dibidable_by_two(M))
    
    if ans == 2**100000:
        print(0)
    else:
        print(ans)

Submission status: Wrong Answer

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

def dibidable_by_two(N):
    ans = 0
    if N ==0:
        return 0
    else:
        while 1:
            if N%2 !=0:
                return ans
            else:
                N /= 2
                ans += 1

if A == B == C:
    print(-1)
elif A%2!=0 or B%2!=0 or C%2!=0:
    print(0)
else:
    ans = 2**100000
    for M in [A,B,C]:
        if M != 0:
            ans  =min(ans,dibidable_by_two(M))
    if ans!= 2**100000:
        print(ans)
    else:
        print(0)

Submission status: Wrong Answer

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

def dibidable_by_two(N):
    ans = 0
    if N ==0:
        return 0
    else:
        while 1:
            if N%2 !=0:
                return ans
            else:
                N /= 2
                ans += 1

if A == B == C:
    print(-1)
elif A%2!=0 or B%2!=0 or C%2!=0:
    print(0)
else:
    ans = 2**100000
    for M in [A,B,C]:
        if M!=0:
            ans=min(ans,dibidable_by_two(M))
            
    print(ans)

Submission status: Wrong Answer

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

def dibidable_by_two(N):
    ans = 0
    if N ==0:
        return 0
    else:
        while 1:
            if N%2 !=0:
                return ans
            else:
                N /= 2
                ans += 1


if A%2!=0 or B%2!=0 or C%2!=0:
    print(0)
else:
    if A == B == C:
        print(-1)
    else:
        ans = 2**100000
        for M in [A,B,C]:
            if M!=0:
                ans=min(ans,dibidable_by_two(M))
                
        print(ans)

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 == 0 and b % 2 == 0 and c % 2 == 0:
    a_tmp = b // 2 + c // 2
    b_tmp = a // 2 + c // 2
    c_tmp = a // 2 + b // 2
    a, b, c = a_tmp, b_tmp, c_tmp
    ans += 1

print(ans)

Submission status: Wrong Answer

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

ans = 0
while(1):
  tmp_A,tmp_B,tmp_C = A,B,C
  if(((tmp_B+tmp_C)%2 == 1)or((tmp_B+tmp_C)%2 == 1)or((tmp_A+tmp_B)%2 == 1)):
    break   
  A,B,C = (tmp_B+tmp_C)//2, (tmp_C+tmp_A)//2, (tmp_A+tmp_B)//2
  if((tmp_A == A)and(tmp_B == B)and(tmp_C == C)):
    ans = -1
    break
  ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
def isOdd(n):
    return n % 2 == 1


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


def mi():
    return map(int, input().split())


def ii():
    return int(input())


A, B, C = li()

cnt = 0
ABC = []
flag = False
while True:
    if flag:
        break
    ABC.append([A, B, C])
    A2 = A // 2
    B2 = B // 2
    C2 = C // 2
    A = B2 + C2
    B = A2 + C2
    C = A2 + B2
    cnt += 1

    if isOdd(A) or isOdd(B) or isOdd(C):
        break

    for i in range(len(ABC)):
        if ABC[i] == [A, B, C]:
            cnt = -1
            flag = True
            break

print(cnt)

Submission status: Wrong Answer

Solution code:
a, b, c=map(int, input().split())
if a==b and b==c:
  print(-1)
else:
  cnt=0
  for i in range(1000):
    if a%2==1 or b%2==1 or c%2==1:
      print(cnt)
      break
    if i==1000:
      print(-1)
    cnt+=1
    ha=a/2
    hb=b/2
    hc=c/2
    a=hb+hc
    b=ha+hc
    c=ha+hb

Submission status: Wrong Answer

Solution code:
a, b, c=map(int, input().split())
if a==b and b==c:
  print(-1)
else:
  cnt=0
  for i in range(10000):
    if a%2==1 or b%2==1 or c%2==1:
      print(cnt)
      break
    if i==10000:
      print(-1)
    cnt+=1
    ha=a/2
    hb=b/2
    hc=c/2
    a=hb+hc
    b=ha+hc
    c=ha+hb

Submission status: Wrong Answer

Solution code:
a, b, c=map(int, input().split())
if a==b and b==c:
  print(-1)
else:
  cnt=0
  while(1):
    if a%2==1 or b%2==1 or c%2==1:
      print(cnt)
      break
    cnt+=1
    ha=a/2
    hb=b/2
    hc=c/2
    a=hb+hc
    b=ha+hc
    c=ha+hb

Submission status: Wrong Answer

Solution code:
def chage_cokies():
    a, b, c = map(int, input().split())
    all_cokies = a + b + c
    count = 1
    while True:
        if all_cokies % 2 == 0 and a == b == c:
            print(-1)
            break
        A = int((b + c) / 2)
        B = int((c + a) / 2)
        C = int((a + b) / 2)

        a = A
        b = B
        c = C

        if all_cokies % 2 != 0:
            return print(0)
        elif a % 2 == 1 | b % 2 == 1 | c % 2 == 1:
            print(count)
            break
        else:
            count += 1


chage_cokies()

Submission status: Wrong Answer

Solution code:
def chage_cokies():
    a, b, c = map(int, input().split())
    all_cokies = a + b + c
    count = 1
    if all_cokies % 2 != 0:
        return False
    while True:
        if a == b == c:
            print(-1)
            break
        A = int((b + c) / 2)
        B = int((c + a) / 2)
        C = int((a + b) / 2)

        a = A
        b = B
        c = C

        if a % 2 != 0 or b % 2 != 0 or c % 2 != 0:
            print(count)
            break
        else:
            count += 1


chage_cokies()

Submission status: Wrong Answer

Solution code:
def chage_cokies():
    a, b, c = map(int, input().split())
    all_cokies = a + b + c
    count = 1
    if all_cokies % 2 != 0:
        return False
    while True:
        if a == b == c:
            print(-1)
            break
        A = int((b + c) / 2)
        B = int((c + a) / 2)
        C = int((a + b) / 2)

        a = A
        b = B
        c = C

        if a % 2 != 0 or b % 2 != 0 or c % 2 != 0:
            print(count)
            break
        else:
            count += 1

chage_cokies()

Submission status: Wrong Answer

Solution code:
A,B,C = list(map(int,input().split()))
count = 0
if A == B == C:
    print(-1)
    exit()
while True:
    if A%2 == 1 or B%2 == 1 or C%2 == 1:
        break
    A_half = A//2
    B_half = B//2
    C_half = C//2
    A = B_half+C_half
    B = A_half+C_half
    C = A_half+B_half
    count += 1
print(count)

Submission status: Wrong Answer

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

if a == b == c: 
    print(-1)
    exit()
else:
    count = 0
    while True:
        if a%2 == 1 or b%2 == 1 or c%2 == 1:
            print(count)
            exit()
        else:
            count += 1
            x = (b+c)//2
            y = (c+a)//2
            z = (a+b)//2
            a = x
            b = y
            c = z