Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p02847 (python)

Fixed submission:
S = str(input())

if S == "SUN":
    print(7)
elif S == "MON":
    print(6)
elif S == "TUE":
    print(5)
elif S == "WED":
    print(4)
elif S == "THU":
    print(3)
elif S == "FRI":
    print(2)
else:
    print(1)

Buggy submission (verdict: Runtime Error):
S = int(input())

if S == "SUN":
    print(7)
elif S == "MON":
    print(6)
elif S == "TUE":
    print(5)
elif S == "WED":
    print(4)
elif S == "THU":
    print(3)
elif S == "FRI":
    print(2)
else:
    print(1)

Buggy submission (verdict: Runtime Error):
S = int(input())

if S == "SUN":
    print(7)
elif S == "MON":
    print(6)
elif S == "TUE":
    print(5)
elif S == "WED":
    print(4)
elif S == "THU":
    print(3)
elif S == "FRI":
    print(2)
else*
    print(1)
Problem p02860 (python)

Fixed submission:
import math
N = int(input())
S = str(input())

if N == 1:
    print('No')
    exit()
if N%2 == 1:
    print('No')
    exit()

n = (N//2)
j = True


for i in range(n):
    if S[i] != S[i + n]:
        j = False

if j:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
import math
N = int(input())
S = str(input())

if N == 1:
    print('No')
    exit()
if N%2 == 1:
    print('No')
    exit()

n = (N/2)
j = True


for i in range(n):
    if S[i] != S[i + n]:
        j = False

if j:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
N = int(input())
S = str(input())

if N%2 == 1:
    print('No')
    exit()

n = (N/2)
j = True


for i in range(n):
    if S[i] != S[i + n]:
        j = False

if j:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
import math
N = int(input())
S = str(input())

if N == 1:
    print('No')
    exit()

n = math.ceil(N/2)
j = True

if N%2 == 0:
    for i in range(n):
    if S[i] != S[i + n]:
        j = False
else:
    for i in range(n-1):
    if S[i] != S[i + n]:
        j = False

if j:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
import math
N = int(input())
S = str(input())

if N == 1:
    print('No')
    exit()

n = math.ceil(N/2)
j = True

try:
    for i in range(n):
    if S[i] != S[i + n]:
        j = False
except:
    break

if j:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
import math
N = int(input())
S = str(input())

if N == 1:
    print('No')
    exit()

n = math.ceil(N/2)
j = True

for i in range(n):
    if S[i] != S[i + n]:
        j = False

if j:
    print('Yes')
else:
    print('No')
Problem p02594 (python)

Fixed submission:
# -*- coding: utf-8 -*-
x = int(input())

if x >= 30:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
x = int(input())

if x >= 30:
  print('Yes')
else
  print('No')
Problem p02572 (python)

Fixed submission:
N = int(input())
A = [int(num) for num in input().split()]

sumA = sum(A)
ans = 0
for i in range(len(A)):
    sumA = sumA - A[i]
    ans += A[i] * sumA


ans = ans % (10**9+7)
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = [int(num) for num in input().split()]

sumA = sum(A)
ans = 0
for i in range(len(A)):
    sumA = sumA - A[i]
    ans += A[i] * sumA


ans = ans % (10**9)+7)
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = [int(num) for num in input().split()]

sumA = sum(A)
ans = 0
for i in range(len(A)):
    sumA = sumA - A[i]
    ans += A[i] * sumA


ans = ans % (10**9)+7))
print(ans)
Problem p02595 (python)

Fixed submission:
N, D = map(int, input().split())
ans = 0

DD = D*D
for i in range(N):
    x, y = map(int, input().split())

    if(x*x + y*y <= DD):
        ans += 1 

print(ans)

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
H = [int(num) for num in input().split()]
ans = [1] * N

for i in range(M):
    A, B = map(int, input().split())
    if(H[A-1] > H[B-1]):
        ans[B-1] = 0
    elif(H[B-1] > H[A-1]):
        ans[A-1] = 0
    else:
        ans[A-1] = 0
        ans[B-1] = 0

print(sum(ans))

Buggy submission (verdict: Runtime Error):
20 100000
14309 -32939
-56855 100340
151364 25430
103789 -113141
147404 -136977
-37006 -30929
188810 -49557
13419 70401
-88280 165170
-196399 137941
-176527 -61904
46659 115261
-153551 114185
98784 -6820
94111 -86268
-30401 61477
-55056 7872
5901 -163796
138819 -185986
-69848 -96669
Problem p02596 (python)

Fixed submission:
K = int(input())

a = [0] * 1000001
a[0] = 7 % K
for i in range(1000000):
    a[i+1] = (a[i] * 10 + 7) % K 
    
    if (a[i] == 0):
        break

if(i == 999999):
    print('-1')
else:
    print(i+1)

Buggy submission (verdict: Runtime Error):
K = int(input())

a = [0] * 1000000
a[0] = 7 % K
for i in range(1000000):
    a[i+1] = (a[i] * 10 + 7) % K 
    
    if (a[i] == 0):
        break

if(i == 999999):
    print('-1')
else:
    print(i+1)
Problem p02832 (python)

Fixed submission:
N = int(input())
As = [int(i) for i in input().split()]

ColNum = 1
ans = 0
for i in range(N):
  if(As[i] != ColNum):
    ans += 1
  else:
    ColNum += 1

if(ColNum == 1):
  ans = -1

print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
As = [int(i) for i in input().split()]

iter = 0
ans = 0
while(True):
  while(As[iter] != (iter+1)):
    del As[iter]
    ans += 1
  iter += 1

  if(iter >= len(As)):
    break
print(ans)
Problem p03013 (python)

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

broken = [N+1]*(M+1)
ans = [0]*(N+1)
broken_pointer = 0
for i in range(M):
    a = int(input())
    broken[i] = a

ans[0] = 1
if(broken[0] == 1):
    ans[1] = 0
    broken_pointer += 1
else:
    ans[1] = 1

for i in range(2,N+1):
    if (broken[broken_pointer] == i):
        ans[i] = 0
        broken_pointer += 1
    else:
        ans[i] = ans[i-1] + ans[i-2]
    

print(ans[N]%1000000007)

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

broken = [0]*M
ans = [0]*(N+1)

for i in range(M):
    a = int(input())
    broken[i] = a

ans[0] = 1
if(broken[0] == 1):
    ans[1] = 0
else:
    ans[1] = 1

for i in range(2,N+1):
    if (i in broken):
        ans[i] = 0
    else:
        ans[i] = ans[i-1] + ans[i-2]
    

print(ans[N]%1000000007)

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

broken = []
ans = [0]*(N+1)

for i in range(M):
    a = int(input())
    broken.append(a)

ans[0] = 1
if(broken[0] == 1):
    ans[1] = 0
else:
    ans[1] = 1

for i in range(2,N+1):
    if (i in broken):
        ans[i] = 0
    else:
        ans[i] = ans[i-1] + ans[i-2]
    

print(ans[N]%1000000007)

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

broken = []
ans = [0]*(N+1)

for i in range(M):
    a = int(input())
    broken.append(a)

ans[0] = 1
if(broken[0] == 1):
    ans[1] = 0
else:
    ans[1] = 1

for i in range(2,N+1):
    if (i in broken):
        ans[i] = 0
    else:
        ans[i] = ans[i-1] + ans[i-2]
    

print(ans[N]%1000000007)
Problem p02570 (python)

Fixed submission:
D,T,S = map(int,input().split())
if D/S - T >0:
    print('No')
else:
    print('Yes')

Buggy submission (verdict: Runtime Error):
D = int(input())
T = int(input())
S = int(input())
if D/S - T >0:
    print('No')
else:
    print('Yes')

Buggy submission (verdict: Runtime Error):
D = int(input())
T = int(input())
S = int(input())
if D/S - T >0:
    print('No')
else:
    print('Yes')
Problem p02859 (python)

Fixed submission:
r=int(input())
print(r*r)

Buggy submission (verdict: Runtime Error):
int(input())
print(r*r)

Buggy submission (verdict: Runtime Error):
print(r*r)
Problem p03013 (python)

Fixed submission:
n, m = map(int, input().split())

fib = [0]*(n + 1)
fib[0] = 1
fib[1] = 1
for x in range(2, n+1):
    fib[x] = fib[x-1] + fib[x-2]

mod = 10**9+7
ans = 1
prev_a = -1
a = 0
for i in range(m):
    a = int(input())
    if a - 1 == prev_a:
        ans = 0
        break
    else:
        ans = (ans * fib[a - prev_a - 2]) % mod
    prev_a = a

if m == 0:
    ans = fib[n] % mod
else:
    ans = (ans * fib[n - a - 1]) % mod
print(ans)

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split())

fib = [0]*n
fib[0] = 1
fib[1] = 1
for x in range(2, n):
    fib[x] = fib[x-1] + fib[x-2]

mod = 10**9+7
ans = 1
prev_a = -1
for i in range(m):
    a = int(input())
    if a - 1 == prev_a:
        ans = 0
        break
    else:
        ans = (ans * fib[a - prev_a - 2]) % mod
    prev_a = a

ans = (ans * fib[n - a - 1]) % mod
print(ans)
Problem p03072 (python)

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

count = 0
maximum = 0
for i in range(N):
    if H[i] >= maximum:
        maximum = H[i]
        count += 1


print(count)

Buggy submission (verdict: Runtime Error):
A, B = map(int, input().split())

pattern1 = A+A-1
pattern2 = A+B
pattern3 = B+B-1

print(max(pattern1, pattern2, pattern3))
Problem p02753 (python)

Fixed submission:
s = str(input())
if s == "AAA" or s == "BBB":
    print("No")
else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
s = str(input())
if s == "AAA" or s == "BBB":
    input("No")
else:
    input("Yes")
Problem p03201 (python)

Fixed submission:
import math
n = int(input())
l = sorted(list(map(int,input().split())))
c = 0
b = {}
for i in range(len(l)):
    if l[i] in b:
        b[l[i]] += 1
    else:
        b[l[i]] = 1

for i in range(len(l) - 1, -1, -1):
    if  b[l[i]] == 0:
        continue
    t = l[i]
    b[l[i]] -= 1
    s = 2 ** math.floor(math.log2(t))
    st = 2*s - t 
    if l == []:
        break
    if st in b and b[st] > 0:
        b[2 * s - t] -= 1
        c += 1
print(c)

Buggy submission (verdict: Runtime Error):
import math
n = int(input())
l = sorted(list(map(int,input().split())))
c = 0
b = {}
for i in range(len(l)):
    if l[i] in b:
        b[l[i]] += 1
    else:
        b[l[i]] = 1

for i in range(len(l) - 1, -1, -1):
    if  b[l[i]] == 0:
        continue
    t = l[i]
    b[l[i]] -= 1
    s = 2 ** math.floor(math.log2(temp))
    st = 2*s - t 
    if l == []:
        break
    if st in b and b[st] > 0:
        b[2 * s - t] -= 1
        c += 1
print(c)
Problem p03295 (python)

Fixed submission:
n, m = map(int, input().split())
l = []
for i in range(m):
    a, b = map(int, input().split())
    l.append((b, a))
l.sort()
answer = 0
last = 0
for b, a in l:
    if a >= last:
        answer += 1
        last = b
print(answer)

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split())
ab = [[int(i) for i in input().split()] for i in range(m)]
count = 0
while len(ab) > 0:
    ab = sorted(ab, key = lambda x: x[1])
    end = ab[0]
    list.sort(ab, reverse=True)
    remove = ab.index(end)
    while ab[remove][0] == end[0]:
        remove += 1
    del ab[(remove - 1):]
    count += 1
print(int(count))
Problem p02571 (python)

Fixed submission:
s = input()
t = input()
 
ans = 0
 
for i in range(len(s) - len(t) + 1):
  count = 0
  for j in range(len(t)):
    if s[i + j] == t[j]:
      count += 1
 
  if ans <= count:
    ans = count
print(len(t) - ans)

Buggy submission (verdict: Runtime Error):
s, t = input(), input()

ans = 0

for i in range(len(s) - len(t) + 1):
  count = 0
  for j in range(len(t)):
    if s[i][j] == t[j]:
      count += 1

if ans <= count:
  ans = count
print(len(t) - count)
Problem p02622 (python)

Fixed submission:
s = input()
t = input()
 
count = 0
 
for i in range(len(s)):
	if s[i] != t[i]:
		count += 1
print(count)

Buggy submission (verdict: Runtime Error):
s = input()
t = input()
 
count = 0
 
for i in range(len(s))
if s[i] != t[i]:
  count += 1

print(count)

Buggy submission (verdict: Runtime Error):
s = input()
t = input()

count = 0

for i in range(len(s))
if s[i] == t[i]:
  count += 1

print(count)
Problem p02676 (python)

Fixed submission:
k = int(input())
s = input()
if len(s)<=k:
	print(s)
else:
    print(s[:k]+"...")

Buggy submission (verdict: Runtime Error):
n = int(input())
word = input()
ans = ""
if len(word) <= n:
	print(word)
else:
	for i in range(n):
    	ans += word[i]
	ans +=("...")
	print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
word = input()
ans = ""
if len(word) < n:
	print(word)
else:
	for i in range(n):
    	ans += word[i]
print(ans + "...")
Problem p02790 (python)

Fixed submission:
a, b = map(int,input().split())
a1, b1 = str(a) * b, str(b) * a
ans = min(a1[0],b1[0])
if int(ans) == b:
  print(b1)
else:
  print(a1)

Buggy submission (verdict: Runtime Error):
a, b = map(int,input().split())
a = ("".join(a))*b
Problem p02571 (python)

Fixed submission:
s=list(input())
t=list(input())
ans=[]
for i in range(len(s)-len(t)+1):
  cnt=0
  for j in range(i,len(t)+i):
    if s[j]!=t[j-i]:
      cnt+=1
  ans.append(cnt)
print(min(ans))

Buggy submission (verdict: Runtime Error):
s=list(input())
t=list(input())
ans=[]
for i in range(len(s)-len(t)):
  cnt=0
  for j in range(i,len(t)+i):
    if s[j]!=t[j-i]:
      cnt+=1
  ans.append(cnt)
print(min(ans))

Buggy submission (verdict: Runtime Error):
s=list(input())
t=list(input())
ans=[]
for i in range(len(s)-len(t)):
  cnt=0
  for j in range(i,len(t)+i):
    if s[j]!=t[j]:
      cnt+=1
  ans.append(cnt)
print(min(ans))
Problem p02595 (python)

Fixed submission:
# coding: utf-8
# Your code here!
n,d=map(int,input().split())
ans=0
a=[]
for i in range(n):
  e=list(map(int,input().split()))
  a.append(e)
a.sort()
for i in range(n):
  #print(a[i][0]**2+a[i][1]**2)
  if a[i][0]**2+a[i][1]**2<=d**2:
    ans+=1
print(ans)

Buggy submission (verdict: Runtime Error):
n,d=map(int,input().split())
ans=0
for i in range(n):
  a.append(list(map(int,input().split())))
a=list(set(a))
for i in range(n):
  if a[i][0]^2+a[i][1]^2<=d^2:
    ans+=1
print(ans)
Problem p02659 (python)

Fixed submission:
# coding: utf-8
# Your code here!

a,b=input().split()
b=list(b)
if a=="0" or b=="0":
    print(0)
else:
    b.remove('.')
    b=''.join(b)
    a=int(a)
    b=int(b)
    c=str(a*b)
    if a*b<100:
        print(0)
    else:
        c=list(c)
        del c[-1]
        del c[-1]
        c=''.join(c)
        print(c)

Buggy submission (verdict: Runtime Error):
# coding: utf-8
# Your code here!

a,b=input().split()
b=list(b)
if a=="0" or b=="0":
    print(0)
else:
    b.remove('.')
    b=''.join(b)
    a=int(a)
    b=int(b)
    c=str(a*b)
    c=list(c)
    del c[-1]
    del c[-1]
    c=''.join(c)
    print(c)

Buggy submission (verdict: Runtime Error):
a,b=input().split()
b=list(b)
b.remove('.')
b=''.join(b)
a=int(a)
b=int(b)
c=a*b
c=list(str(c))
c.insert('.',len(c)-3)
print(''.join(c))
Problem p02682 (python)

Fixed submission:
a,b,c,k=map(int,input().split())
d=k-a
if d<0:
  print(k)
else:
  ans=a
  d-=b
  if d<0:
    print(ans)
  else:
    print(ans-d)

Buggy submission (verdict: Runtime Error):
a,b,c,k=map(int,input().split())
print(min(k,a)+min(max(k-a,0),abs(k-a-b))+min(max(k-a-b,0),abs(k-a-b-c))
Problem p02881 (python)

Fixed submission:
c=int(input())
count=1
ans=10000000000000
k=c
for i in range(1,int(c**(1/2)+100000)):
    if c%i==0:
        if ans>i+int(c/i):
            ans=i+int(c/i)
        else:
            continue
print(ans-2)

Buggy submission (verdict: Runtime Error):
=int(input())
count=1
ans=10000000000000
k=c
for i in range(1,int(c**(1/2)+100000)):
    if c%i==0:
        count*=i
        k=int(k/i)
        if ans>count+k:
            ans=count+k
            count=0
            k=c
        else:
            count=0
            k=c
print(ans-2)

Buggy submission (verdict: Runtime Error):
c=int(input())
count=1
ans=10000000000000
k=c
a=[]
for i in range(1,int(c**(1/2))):
    if c%i==0:
        count*=i
        k=int(k/i)
        a.append(count+k)
        count=1
        k=c
print(a)
print(min(a)-2)

Buggy submission (verdict: Runtime Error):
c=int(input())
count=1
ans=10000000000000
k=c
a=[]
for i in range(1,int(c**(1/2))):
    if c%i==0:
        count*=i
        k=int(k/i)
        a.append(count+k)
        count=1
        k=c
print(a)
print(min(a)-2)

Buggy submission (verdict: Runtime Error):
c=int(input())
count=1
ans=10000000000000
k=c
a=[]
for i in range(1,int(c**(1/2))):
    if c%i==0:
        count*=i
        k=int(k/i)
        a.append(count+k)
print(min(a)-2)
Problem p02912 (python)

Fixed submission:
import heapq
n,m=map(int,input().split())
x=list(map(int,input().split()))
for k in range(n):
    x[k]-=2*x[k]
heapq.heapify(x)
ans=0
for i in range(m):
    maxvalue=heapq.heappop(x)*(-1)
    heapq.heappush(x,(maxvalue//2)*(-1))
ans=-1*sum(x)
print(ans)

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
x=list(map(int,input().split()))
x.sort(reverse=True)
ans=0
a=[]
k=0
left = 0
right = len(x) - 1
for i in range(m):
    x[0]=x[0]//2
    while left <= right:
        mid = (left + right) // 2
        if  x[mid] >= x[0]>=x[mid+1]:
            x.insert(mid+1,x[0])
            x.remove(x[0])
            break               
        elif x[mid] > x[0]:
            right = mid - 1
        else:
            left = mid + 1
for j in range(n):
    ans+=x[j]
print(ans)

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
x=list(map(int,input().split()))
x.sort(reverse=True)
ans=0
a=[]
k=0
for i in range(m):
    x[0]=x[0]//2
    if x[0]<x[1]:
        x.sort(reverse=True)
print(ans)

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
x=list(map(int,input().split()))
x.sort(reverse=True)
ans=0
a=[]
print(x)
k=0
if n==1:
    for i in range(m):
        x[0]=x[0]//2
        if x[0]<x[1]:
            x.sort(reverse=True)
print(ans)

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
x=list(map(int,input().split()))
x.sort(reverse=True)
ans=0
a=[]
print(x)
k=0
if n==1:
    for i in range(m):
        x[0]=x[0]//2
    ans=x[0]
else:
    for i in range(m):
        if x[0]<x[1]:
            a.append(x[0])
            x.remove(x[0])
        else:
            x[0]=x[0]//2
            continue
        if len(a)>0:
            if a[0]>x[0]:
                a[0]=a[0]//2
                a.sort(reverse=True)
            else:
                x[0]=x[0]//2
    for j in range(len(x)):
        ans+=x[j]
    for o in range(len(a)):
        ans+=a[o]
print(ans)
Problem p02951 (python)

Fixed submission:
a, b, c = map(int, input().split())
if b+c>a:
    print(b+c-a)
else:
    print(0)

Buggy submission (verdict: Runtime Error):
n=int(input())
h=list(map(int,input().split()))
ans='Yes'
for i in range(n-1,0,-1):
    print(h[i])
    if h[i]>h[i-1]:
        continue
    elif h[i]+1==h[i-1]:
        h[i-1]-=1
    else:
        ans='No'
print(ans)
Problem p03013 (python)

Fixed submission:
n,m=map(int,input().split())
a=[]
for i in range(m):
    a.append(int(input()))
ans=[10*9]*n
ans[0]=1
for i in range(m):
    ans[a[i]-1]=0
if len(ans)>1 and ans[1]!=0:
    ans[1]=ans[0]+1
for j in range(n-2):
    if ans[j+2]==0:
        continue
    else:
        ans[j+2]=ans[j+1]+ans[j]
        ans[j+2]=ans[j+2]%(1000000007)
    #print(ans)
print(ans[n-1])
#print(ans)

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
a=[]
for i in range(m):
    a.append(int(input()))
ans=[10*9]*n
if a[0]==1:
    ans[0]=0
else:
    ans[0]=1
if len(ans)>1:
    ans[1]=ans[0]+1
for i in range(m):
    ans[a[i]-1]=0
for j in range(n-2):
    if ans[j+2]==0:
        continue
    else:
        ans[j+2]=ans[j+1]+ans[j]
        ans[j+2]=ans[j+2]%(1000000007)
    #print(ans)
print(ans[n-1])
#print(ans)

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
a=[]
for i in range(m):
    a.append(int(input()))
ans=[n]*n
ans[0]=1
for i in range(m):
    ans[a[i]-1]=0
ans[1]=ans[0]+1
for j in range(n-2):
    if ans[j+2]==0:
        continue
    else:
        ans[j+2]=ans[j+1]+ans[j]
        ans[j+2]=ans[j+2]%(1000000007)
    #print(ans)
print(ans[n-1])
#print(ans)
Problem p03186 (python)

Fixed submission:
a,b,c=map(int,input().split())
if c<=a+b+1:
    print(b+c)
else:
    print(a+2*b+1)

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input(),split())
if c<=a+b:
    print(b+c)
else:
    print(a+2*b)
Problem p03315 (python)

Fixed submission:
s=list(input())
ans=0
for i in range(4):
    if s[i]=='+':
        ans+=1
    else:
        ans-=1
print(ans)

Buggy submission (verdict: Runtime Error):
n,k=map(int,input().split())
a=list(map(int,input().split()))
if n==k:
    print(1)
else:
    ans=0
    cnt=k
    for i in range(2,n):
        cnt+=(k-1)
        if cnt>=n:
            ans=i
            break
    print(ans)
Problem p03723 (python)

Fixed submission:
a,b,c=map(int,input().split())
if a%2!=0 or b%2!=0 or c%2!=0:
    print(0)
else:
    a1=0
    a2=0
    a3=0
    c1=0
    c2=0
    c3=0
    ans=0
    for i in range(2*10**5):
        if a%2!=0:
            c1=1        
        if b%2!=0:
            c2=1        
        if c%2!=0:
            c3=1
        if c1==1 or c3==1 or c2==1:
            ans=i
            break
        else:
            a3=(a+b)//2
            a2=(a+c)//2
            a1=(b+c)//2
            a=a1
            b=a2
            c=a3
        #print(a,b,c)
        if i==199999:
            ans=-1
    print(ans)

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
if a==b and b==c:
    print(-1)
elif if a%2!=0 or b%2!=0 or c%2!=0:
    print(0)
else:
    a1=0
    a2=0
    a3=0
    c1=0
    c2=0
    c3=0
    ans=0
    for i in range(200000):
        if a%2!=0:
            c1=1        
        if b%2!=0:
            c2=1        
        if c%2!=0:
            c3=1
        if c1==1 or c3==1 or c2==1:
            ans=i
            break
        else:
            a3=(a+b)//2
            a2=(a+c)//2
            a1=(b+c)//2
            a=a1
            b=a2
            c=a3
        #print(a,b,c)
        if i==199999:
            ans=-1
    print(ans)
Problem p03775 (python)

Fixed submission:
n=int(input())
cnt=[]
for i in range(1,int(n**(1/2))+1000):
    if n%i==0:
        cnt.append(n//i)
        cnt.append(i)
#print(cnt)
ans=[]
for j in range(len(cnt)//2):
    a=list(str(cnt[2*j]))
    b=list(str(cnt[2*j+1]))
    ans.append(max(len(a),len(b)))
print(min(ans))

Buggy submission (verdict: Runtime Error):
n=int(input())
import fractions
def prime_decomposition(n):
  i = 2
  table = []
  while i * i <= n:
    while n % i == 0:
      n = n//i
      table.append(i)
    i += 1
  if n > 1:
    table.append(n)
  return table
d=list(prime_decomposition(n))
cnt=n
ans=[]
a=1
b=1
if n==1:
    print(1)
else:
    if len(list(str(d[len(d)-1])))>(len(list(str(n)))+1)//2:
        print(len(list(str(d[len(d)-1]))))
    else:
        for i in range(len(d)):
            if i%2==0:
                a*=d[i//2]
            else:
                a*=d[len(d)-i//2]
            if a>n**(1/2):
                break
        a=str(a)
        print(len(list(a)))
        #print(a)

Buggy submission (verdict: Runtime Error):
n=int(input())
import fractions
def prime_decomposition(n):
  i = 2
  table = []
  while i * i <= n:
    while n % i == 0:
      n = n//i
      table.append(i)
    i += 1
  if n > 1:
    table.append(n)
  return table
d=list(prime_decomposition(n))
cnt=n
ans=[]
a=1
if n==1:
    print(1)
else:
    if len(list(str(d[len(d)-1])))>=(len(list(str(n)))+1)//2:
        print(len(list(str(d[len(d)-1]))))
    else:
        for i in range(d):
            a*=d[i]
            if a>n**(1/2):
                break
        a=str(a)
        print(len(list(a)))

Buggy submission (verdict: Runtime Error):
n=int(input())
import fractions
def prime_decomposition(n):
  i = 2
  table = []
  while i * i <= n:
    while n % i == 0:
      n = n//i
      table.append(i)
    i += 1
  if n > 1:
    table.append(n)
  return table
d=list(prime_decomposition(n))
cnt=n
ans=[]
a=1
if len(list(str(d[len(d)-1])))>=len(list(str(n)))//2+1:
    print(len(list(str(d[len(d)-1]))))
else:
    print(len(list(str(n)))//2+1)