Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
from math import floor, sqrt


def func(x):
    return floor((sqrt(1 + 8 * x) - 1) / 2)


N = int(input())
limit = floor(sqrt(N))

primes = [2]

count = 0
flag = True
p = 2
while 1:
    #print(p,N)
    isprime = True
    if N == 1:
        break
    if p > sqrt(N):
        count += 1
        break
    if p > 3:
        for i in primes:
            if i >= sqrt(p):
                break
            if p % i == 0:
                isprime = False
                break
        if not isprime:
            p += 2
            continue
        primes.append(p)
    a = 0
    while N % p == 0:
        #print("while",p, a)
        a += 1
        N = N // p
    count += func(a)
    if p == 2:
        p = 3
    else:
        p += 2
print(count)





Fixed submission:
from math import floor, sqrt


def func(x):
    return floor((sqrt(1 + 8 * x) - 1) / 2)


N = int(input())
limit = floor(sqrt(N))

primes = [2]

count = 0
flag = True
p = 2
while 1:
    #print(p,N)
    isprime = True
    if N == 1:
        break
    if p > sqrt(N):
        count += 1
        break
    
    a = 0
    while N % p == 0:
        #print("while",p, a)
        a += 1
        N = N // p
    count += func(a)
    if p == 2:
        p = 3
    else:
        p += 2
print(count)
Buggy python submission (verdict: Runtime Error):
def step(n, lis):
  return [l+n for l in lis]

def func(lis):
  if len(lis)==0:
    return -1
  maxval = max(lis)
  lis.pop(lis.index(maxval))
  if maxval==2:
    lis.append(1)
  if maxval>2:
    lis.append(maxval-1)
    lis.append(maxval-2)
  lis.sort()
  lis = lis[:maxA]
  return maxval
N = int(input())
A = list(map(int, input().split()))
maxA = max(A)

lis = [0]
count = 0
ans = 0
flag=False
for i in range(N+1):
  count += 1
  if flag:
    break
  if A[i]==0:
    continue
  lis = step(count, lis)
  count=0
  a = A[i]
  #print(i,lis)
  for j in range(a):
    
    res = func(lis)
    #print(i, res, lis)
    if res == -1:
      flag=True
      break
    else:
      ans += res
  
if flag:
  print(-1)
else:
  print(ans)

Fixed submission:
H1, M1, H2, M2, K = map(int, input().split())
ans = (H2*60 + M2) - (H1*60 + M1) - K
print(ans)
Buggy python submission (verdict: Runtime Error):
import queue

q = queue.Queue()
N, M = map(int, input().split())

ans = [-1 for i in range(N+1)]
path = [[] for i in range(N+1)]

for i in range(M):
  A, B = map(int, input().split())
  path[A].append(B)
  path[B].append(A)
q.put(1)
COUNTER = 0
while not q.empty() :
  now = q.get()
  for p in path[now]:
    if ans[p]==-1:
      ans[p]=now
      q.put(p)
      #print(COUNTER, now,p)
      COUNTER+=1
      
print("Yes")
for i in ans[2:]:
  print(i)


Fixed submission:
x = input()[-1]
 
if x in ["2","4","5","7","9"]:
  print("hon")
elif x in ["0","1","6","8"]:
  print("pon")
else:
  print("bon")

Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())

ans = [-1 for i in range(N-1)]
path = [[] for i in range(N)]

for i in range(M):
  A, B = map(int, input().split())
  path[A-1].append(B)
  path[B-1].append(A)
nows = [1]
COUNTER = 0
while len(nows)>0 :
  buf = []
  for now in nows:
    for p in path[now-1]:
      if ans[p-2]==-1:
        ans[p-2]=now
        buf.append(p)
        #print(COUNTER)
        COUNTER+=1
  nows = buf
  
print("Yes")
for i in ans:
  print(i)


Fixed submission:
x = input()[-1]
 
if x in ["2","4","5","7","9"]:
  print("hon")
elif x in ["0","1","6","8"]:
  print("pon")
else:
  print("bon")
Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int,input().split())
A = list(map(int, input().split()))
dic = {1:0}
now = 1
flag = 0
T = 0
log = [1]
for i in range(K):
  now = A[now-1]
  if now in log:
    flag=1
    T=i+1-dic[now]
    break
  dic[now] = i+1
  log.append(now)
if flag!=1:
  print(now)
else:
  print(log[(K-dic[now])%T+dic[now]])

Fixed submission:
N, K = map(int,input().split())
A = list(map(int, input().split()))
dic = {1:0}
now = 1
flag = 0
T = 0
log = [1]
for i in range(K):
  now = A[now-1]
  #print(i+1,now)
  if now in dic:
    flag=1
    T=i+1-dic[now]
    log = log[dic[now]:]
    break
  dic[now] = i+1
  log.append(now)
if flag!=1:
  print(now)
else:
  print(log[(K-dic[now])%T])
Buggy python submission (verdict: Runtime Error):
N, K = map(int,input().split())
state = [1 for i in range(N)]
for i in range(K):
  d = int(input())
  for j in range(d):
    x = list(map(int,input().split()))
    for k in x:
      state[k-1] = 0
print(sum(state))

Fixed submission:
N, K = map(int,input().split())
state = [1 for i in range(N)]
for i in range(K):
  d = int(input())
  #print(1,i,d)
  x = list(map(int, input().split()))
  for k in x:
    state[k-1] = 0
print(sum(state))

Buggy python submission (verdict: Runtime Error):
N, K = map(int,input().split())
state = [1 for i in range(N)]
for i in range(K):
  d = int(input())
  for j in range(d):
    x = list(map(int,input().split()))
    for k in x:
      state[x-1] = 0
print(sum(state))

Fixed submission:
N, K = map(int,input().split())
state = [1 for i in range(N)]
for i in range(K):
  d = int(input())
  #print(1,i,d)
  x = list(map(int, input().split()))
  for k in x:
    state[k-1] = 0
print(sum(state))
Buggy python submission (verdict: Time Limit Exceeded):
A, B, N = map(int, input().split())
ans = 0
for x in range(1,min(B,N)+1):
  buf = ((A*x)//B) - (A*(x//B))
  ans = max(ans,buf)
print(ans)

Fixed submission:
A, B, N = map(int, input().split())
ans = 0
x = min(B-1,N)
print((A*x)//B)
Buggy python submission (verdict: Runtime Error):
N, M = map(int,input().split())
for i in range(M):
  if i%2==0:
    j = i//2
    print("{} {}".format(1+j,M+1-j))
  else:
    j = i//2
    print("{} {}".format(M+2+i,2M+1-i))

Fixed submission:
N, M = map(int,input().split())
res = []
for i in range(M):
  if i%2==0:
    j = i//2
    #res.append(M-2*j)
    print("{} {}".format(1+j,M+1-j))
  else:
    j = i//2
    #res.append(M-1-2*j)
    print("{} {}".format(M+2+j,2*M+1-j))
Buggy python submission (verdict: Runtime Error):
N = map(int, input().split())[0]
A = map(int, input().split())
sum = 0
for i in A:
  sum += A
if sum > N:
  print(-1)
else:
  print(N-sum)

Fixed submission:
N = list(map(int, input().split()))[0]
A = list(map(int, input().split()))

sum = 0
for i in A:
  sum = sum + i
if sum > N:
  print(-1)
else:
  print(N-sum)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
res = rep(0,N)
for i in range(N-1):
  res[A[i]-1] += 1
for i in res:
  print(i)

Fixed submission:
N = int(input())
A = list(map(int,input().split()))
res = [0 for i in range(N)]
for i in range(N-1):
  res[A[i]-1] += 1
for i in res:
  print(i)
Buggy python submission (verdict: Runtime Error):
data = input().split("")
res = "No"
for i in data:
  if i=="7":
    res = "Yes"
    break
print(res)   
 

Fixed submission:
data = input()
#print(data)
res = "No"
for i in range(len(data)):
  if data[i]=="7":
    res = "Yes"
    break
print(res)
Buggy python submission (verdict: Runtime Error):
function GCM(x, y):
  if x == y:
    return x
  if x < y:
    s = x
    x = y
    y = s
  
  a = x%y
  if a == 0:
    return y
  return GCM(y, a)

k = int(input())
res = 0
same1 = 0
same2 = 0
rate = [6,3,1]
for p in range(1,k+1):
  for q in range(p, k+1):
    same1 = int(p==q)
    gcm = GCM(q,p)
    for r in range(q, k+1):
      same2 = int(q==r)
      gcm = GCM(r,gcm)
      res += gcm*rate[same1+same2]
print(res)
  

      
  
  	
  

Fixed submission:
def compute_gcm(x, y):
  if x == y:
    return x
  if x < y:
    s = x
    x = y
    y = s
  if x==1:
    return 1
  a = x%y
  if a == 0:
    return y
  return compute_gcm(y, a)

#print(compute_gcm(4,compute_gcm(2,2)))
k = int(input())
res = k**3-(k-1)**3
same1 = 0
same2 = 0
rate = [6,3,1]
for p in range(2,k+1):
  for q in range(p, k+1):
    same1 = int(p==q)
    gcm1 = compute_gcm(q,p)
    for r in range(q, k+1):
      same2 = int(q==r)
      gcm = compute_gcm(r,gcm1)
      res += gcm*rate[same1+same2]
      #print("p:{}, q:{}, r:{}, gcm:{}, rate:{}, sum:{}".format(p,q,r,gcm,rate[same1+same2],res))
print(res)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S = input()
dic = {
  "R":[],
  "G":[],
  "B":[]
}
for i in range(N):
  dic[S[i]].append(i)

res = 0
for a in range(len(dic["R"])):
  for b in range(len(dic["G"])):
    for c in range(len(dic["B"])):
      x1 = dic["R"][a]
      x2 = dic["G"][b]
      x3 = dic["B"][c]
      xsum = x1 + x2 + x3
      if xsum%3!=0:
        res += 1
        continue
      ave = int(xsum/3)
      if x1!=ave and x2!=ave and x3!=ave:
        res += 1
        continue
        
print(res)
        

Fixed submission:
N = int(input())
S = input()
C = {"R", "G", "B"}
cumsum = {c:[0 for i in range(N)] for c in C}

for i in range(N):
  s = S[i]
  cumsum[s][i] = 1
for i in range(2, N+1):
  for c in C:
    cumsum[c][-i] = cumsum[c][-i] + cumsum[c][-(i-1)]
#print(cumsum)
ans = 0
for i in range(N-2):
  s = S[i]
  a, b = C - {s}
  ans += cumsum[a][i]*cumsum[b][i]

for i in range(1, (N-1)//2 + 1):
  for j in range(N-2*i):
    #print(j, j+i, j+2*i, S[j]+S[j+i]+S[j+2*i])
    if S[j] != S[j+i] and S[j+i] != S[j+2*i] and S[j] != S[j+2*i]:
      ans -= 1
print(ans)
Buggy python submission (verdict: Runtime Error):
from collections import deque

K = int(input())

count = 0
ans = 0
Q = deque([1,2,3,4,5,6,7,8,9])
while count != K:
  a = Q.popleft()
  b = a%10
  if b != 0:
    Q.append(q*10 + b - 1)
  Q.append(q*10)
  if b != 9:
    Q.append(q*10 + b + 1)
  count += 1
  ans = q
print(q)

Fixed submission:
from collections import deque
 
K = int(input())
 
count = 0
Q = deque([1,2,3,4,5,6,7,8,9])
while count != K:
  a = Q.popleft()
  b = a%10
  if b != 0:
    Q.append(a*10 + b - 1)
  Q.append(a*10 + b)
  if b != 9:
    Q.append(a*10 + b + 1)
  count += 1
  #print(Q)
print(a)
Buggy python submission (verdict: Time Limit Exceeded):
from collections import deque
 
N, X, Y = map(int, input().split())
ans = [0 for i in range(N)]

dqs = [-1, 1]
for i in range(N-1):
  vis = [-1 for _ in range(N)]
  Q = deque([i])
  vis[i] = 0
  while Q:
    q = Q.popleft()
    for dq in dqs:
      if 0 <= q + dq < N:
      	if vis[q + dq] == -1:
          vis[q + dq] = vis[q] + 1
          Q.append(q + dq)
          if q + dq > i:
            ans[vis[q + dq]] += 1
    if q==X-1:
      if vis[Y-1] == -1:
        vis[Y-1] = vis[q] + 1
        Q.append(Y-1)
        if Y-1 > i:
          ans[vis[Y-1]] += 1
    if q==Y-1:
      if vis[X-1] == -1:
        vis[X-1] = vis[q] + 1
        Q.append(X-1)
        if X-1 > i:
          ans[vis[X-1]] += 1
for a in ans[1:]:
  print(a)

Fixed submission:
from collections import deque
 
N, X, Y = map(int, input().split())
ans = [0 for i in range(N)]

dqs = [-1, 1]
for i in range(N-1):
  vis = [-1 for _ in range(N)]
  Q = deque([i])
  vis[i] = 0
  while Q:
    q = Q.popleft()
    for dq in dqs:
      if 0 <= q + dq < N:
      	if vis[q + dq] == -1:
          vis[q + dq] = vis[q] + 1
          Q.append(q + dq)
          if q + dq > i:
            ans[vis[q + dq]] += 1
    if q==X-1:
      if vis[Y-1] == -1:
        vis[Y-1] = vis[q] + 1
        Q.append(Y-1)
        if Y-1 > i:
          ans[vis[Y-1]] += 1
    if q==Y-1:
      if vis[X-1] == -1:
        vis[X-1] = vis[q] + 1
        Q.append(X-1)
        if X-1 > i:
          ans[vis[X-1]] += 1
for a in ans[1:]:
  print(a)
Buggy python submission (verdict: Runtime Error):
 input()
if len(S)%2 == 0:
  for i in range(len(S)//2):
    if S[i*2:(i+1)*2]!="hi":
      print("No")
      exit()
  print("Yes")
else:
  print("No")

Fixed submission:
s = "hi"
S = input()
flag = False
for i in range(5):
  if S==s:
    flag=True
    break
  s = s+"hi"
if flag:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
S = input()
if len(S)%2 == 0:
  for i in range(len(S)//2):
    if S[i*2:(i+1)*2]!="hi":
      print("No")
      exsit()
  print("Yes")
else:
  print("No")

Fixed submission:
s = "hi"
S = input()
flag = False
for i in range(5):
  if S==s:
    flag=True
    break
  s = s+"hi"
if flag:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
H = int(input())
count = 0
ans = 0
while H>1:
  H = H//2
  ans += 2**i
  count += 1
ans += 2**i
print(ans)

Fixed submission:
H = int(input())
count = 0
ans = 0
while H>1:
  H = H//2
  ans += 2**count
  count += 1
ans += 2**count
print(ans)

Buggy python submission (verdict: Runtime Error):
H = int(input())
count = 0
ans = 0
while H>1:
  H = H//2
  ans += 2**i
  count += 1
ans += 2**i
print(ans)

Fixed submission:
H = int(input())
count = 0
ans = 0
while H>1:
  H = H//2
  ans += 2**count
  count += 1
ans += 2**count
print(ans)
Buggy python submission (verdict: Runtime Error):
def func(x, y):
  if len(y)==1:
    dic.append(i*10+int(y))
  else:
    for j in range(len(y)):
      func(i*10+int(y[j]), y[:j]+y[j+1:])
dic = []

N = int(input())
func(0, "".join([i in range(1,N+1)]))

A = int(input().replace(" ", ""))
B = int(input().replace(" ", ""))
ans = abs(dic.index(A)-dic.index(B))
print(ans)

Fixed submission:
def func(x, y):
  if len(y)==1:
    dic.append(x*10+int(y))
  else:
    for j in range(len(y)):
      func(x*10+int(y[j]), y[:j]+y[j+1:])
dic = []
 
N = int(input())
func(0, "".join([str(i) for i in range(1,N+1)]))
 
A = int(input().replace(" ", ""))
B = int(input().replace(" ", ""))
ans = abs(dic.index(A)-dic.index(B))
print(ans)
Buggy python submission (verdict: Runtime Error):
N, M, V, P = map(int, input().split())
A = list(map(int, input().split()))
Asorted = sorted(A)

n = len(Asorted)
start=0
end = n-P
Ap = A[-P]
total = V*M
while start < end -1:
  #print(start, end)
  i = (start+end-1)//2
  Ai = Asorted[i]
  if Ai + M < Ap:
    start = i+1
    continue
  limit = (Ai + M)*(n-P-i-1) - sum(Asorted[i+1:n-P]) + (i+P)*M
  if limit >= total:
    end = i+1
  else:
    start = i+1
print(n-start)

Fixed submission:
N, A, B = map(int, input().split())

dif = B-A
if dif%2 == 0:
  print(dif//2)
else:
  print(min(A-1, N-B)+1+((dif-1)//2))

Buggy python submission (verdict: Runtime Error):
import numpy as np

N, M, V, P = map(int, input().split())
A = list(map(int, input().split()))
if P == 1:
  Asorted = sorted(A)
else:
  Asorted = sorted(A)[:-(P-1)]

n = len(Asorted)
start=0
end = n
Ap = A[-1]
total = V*M
while start < end -1:
  #print(start, end)
  i = (start+end-1)//2
  Ai = Asorted[i]
  if i == n-1:
    start = n-1
    break
  limit = (Ai + M)*(n-i-1) - sum(Asorted[i+1:]) + (i+P)*M
  if limit >= total:
    end = i+1
  else:
    start = i+1
print(np.sum(np.asarray(A)>=Asorted[start]))

Fixed submission:
N, A, B = map(int, input().split())

dif = B-A
if dif%2 == 0:
  print(dif//2)
else:
  print(min(A-1, N-B)+1+((dif-1)//2))

Buggy python submission (verdict: Runtime Error):
import numpy as np

N, M, V, P = map(int, input().split())
A = list(map(int, input().split()))
Asorted = sorted(A)[:-(P-1)]

n = len(Asorted)
start=0
end = n
Ap = A[-1]
total = V*M
while start < end -1:
  #print(start, end)
  i = (start+end-1)//2
  Ai = Asorted[i]
  if i == n-1:
    start = n-1
    break
  limit = (Ai + M)*(n-i-1) - sum(Asorted[i+1:]) + (i+P)*M
  if limit >= total:
    end = i+1
  else:
    start = i+1
print(np.sum(np.asarray(A)>=Asorted[start]))

Fixed submission:
N, A, B = map(int, input().split())

dif = B-A
if dif%2 == 0:
  print(dif//2)
else:
  print(min(A-1, N-B)+1+((dif-1)//2))

Buggy python submission (verdict: Runtime Error):
import numpy as np

N, M, V, P = map(int, input().split())
A = list(map(int, input().split()))
Asorted = sorted(A)[:-(P-1)]

n = len(Asorted)
start=0
end = n
Ap = A[-1]
total = V*M
while start < end -1:
  #print(start, end)
  i = (start+end-1)//2
  Ai = Asorted[i]
  limit = (Ai + M)*(n-i-1) - sum(Asorted[i+1:]) + (i+P)*M
  if limit >= total:
    end = i+1
  else:
    start = i+1
print(np.sum(np.asarray(A)>=Asorted[start]))

Fixed submission:
N, A, B = map(int, input().split())

dif = B-A
if dif%2 == 0:
  print(dif//2)
else:
  print(min(A-1, N-B)+1+((dif-1)//2))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))
B = [[0 for i in range(N)]for j in range(60)]
M = 1000000007
ans = [0 for i in range(60)]
sumB = [[0 for i in range(N)]for j in range(60)]
for j in range(N):
  for i in range(60):
    B[i][j] = A[j]>>i & 1
    sumB[i][j] = A[j]>>i & 1
    if j > 0:
      sumB[i][j] += sumB[i][j-1]
for i in range(1, N):
  for j in range(60):
    if B[j][-i]==0:
      ans[j] += sumB[j][-(i+1)]
    else:
      ans[j] += N-i-sumB[j][-(i+1)]
a = 0
for i in range(60):
  a += (ans[i]*pow(2, i, M))%M
  a %= M
print(a)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
B = [[0 for i in range(N)]for j in range(60)]
M = 1000000007
ans = [0 for i in range(60)]
sumB = [[0 for i in range(N)]for j in range(60)]
for j in range(N):
  for i in range(60):
    B[i][j] = A[j]>>i & 1
    sumB[i][j] = A[j]>>i & 1
    if j > 0:
      sumB[i][j] += sumB[i][j-1]
for i in range(1, N):
  for j in range(60):
    if B[j][-i]==0:
      ans[j] += sumB[j][-(i+1)]
    else:
      ans[j] += N-i-sumB[j][-(i+1)]
a = 0
for i in range(60):
  a += (ans[i]*pow(2, i, M))%M
  a %= M
print(a)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
ans = [0 for i in range(N)]
for i in range(N):
  ans[A[i]-1] = i+1
print(" ".join(ans))

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
ans = [0 for i in range(N)]
for i in range(N):
  ans[A[i]-1] = i+1
print(*ans)

Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
ans = [0 for i in range(N)]
for i in range(N):
  ans[A[i]-1] = i+1
print(ans.join(" "))

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
ans = [0 for i in range(N)]
for i in range(N):
  ans[A[i]-1] = i+1
print(*ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(int, input().split())
A.sort()
l = A[N//2-1]
h = A[N//2]
print(h-l)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
A.sort()
l = A[N//2-1]
h = A[N//2]
print(h-l)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(input().split())

ans = float("inf")
for i in range(N):
  a = A[i]
  ans_tmp = 0
  while a%2==0:
    a = a//2
    ans_tmp += 1
  ans = min(ans_tmp, ans)
print(ans)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
 
ans = float("inf")
for i in range(N):
  a = A[i]
  ans_tmp = 0
  while a%2==0:
    a = a//2
    ans_tmp += 1
  ans = min(ans_tmp, ans)
print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))

mina = min(A)
mini = A.index(mina)
maxa = max(A)
maxi = A.index(mixa)

if mina >= 0:
  print(N-1)
  for i in range(N-1):
    print("{} {}".format(i+1, i+2))
elif maxa < 0:
  print(N-1)
  for i in range(N-1):
    print("{} {}".format(N-i, N-i-1))
else:
  if -mina < maxa:
    print(2*N-1)
    for i in range(N):
      print("{} {}".format(maxi+1, i+1))
    for i in range(N-1):
      print("{} {}".format(i+1, i+2))
  else:
    print(2*N-1)
    for i in range(N):
      print("{} {}".format(mini+1, i+1))
    for i in range(N-1):
      print("{} {}".format(N-i, N-i-1))

Fixed submission:
N = int(input())
A = list(map(int, input().split()))

mina = min(A)
mini = A.index(mina)
maxa = max(A)
maxi = A.index(maxa)

if mina >= 0:
  print(N-1)
  for i in range(N-1):
    print("{} {}".format(i+1, i+2))
elif maxa < 0:
  print(N-1)
  for i in range(N-1):
    print("{} {}".format(N-i, N-i-1))
else:
  if -mina < maxa:
    print(2*N-1)
    for i in range(N):
      print("{} {}".format(maxi+1, i+1))
    for i in range(N-1):
      print("{} {}".format(i+1, i+2))
  else:
    print(2*N-1)
    for i in range(N):
      print("{} {}".format(mini+1, i+1))
    for i in range(N-1):
      print("{} {}".format(N-i, N-i-1))
Buggy python submission (verdict: Runtime Error):
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)
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)

Fixed submission:
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)

Buggy python submission (verdict: Runtime Error):
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)
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)
提出情報

Fixed submission:
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)

Buggy python submission (verdict: Runtime Error):
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:
    break
  con += 1
  D = A / 2
  E = B / 2
  F = C / 2
  A = E + F
  B = D + F
  C = D + E
  
print(con)

Fixed submission:
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)