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

Fixed submission:
import sys
import fractions as fl

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

#全体の個数
all = b - a + 1
#cとdの最小公倍数
e = c * d // fl.gcd(c, d)
# a以下でcまたはdで割れる個数
r1 = (a-1) // c + (a-1) // d - (a-1) // e
# b以下でcまたはdで割れる個数
r2 = b // c + b // d - b // e
ans = all - (r2 - r1)
print(ans)

Buggy submission (verdict: Runtime Error):
import sys
import fractions as fl

#a, b, c, d = list(input().split())
a = int(a)
b = int(b)
c = int(c)
d = int(d)

#全体の個数
all = b - a + 1
#cとdの最小公倍数
e = c * d // fl.gcd(c, d)
# a以下でcまたはdで割れる個数
r1 = (a-1) // c + (a-1) // d - (a-1) // e
# b以下でcまたはdで割れる個数
r2 = b // c + b // d - b // e
ans = all - (r2 - r1)
print(ans)
Problem p02817 (python)

Fixed submission:
s, t = input().split()

print(t+s)

Buggy submission (verdict: Runtime Error):
a,b,k=map(int, input().split()) 
if a>=k:
  print(a-k,b)
else:
  print(0,max(a-k+b, 0))

Buggy submission (verdict: Runtime Error):
taka, aoki, action = map(int, input().split())
 
if taka >= action:
  print(taka-action, aoki)
  
else:
  print(0, max(taka+aoki-action, 0))

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

print(t+s)
Problem p02818 (python)

Fixed submission:
taka, aoki, action = map(int, input().split())
 
if taka >= action:
  print(taka-action, aoki)
  
else:
  print(0, max(taka+aoki-action, 0))

Buggy submission (verdict: Runtime Error):
taka, aoki, action = map(int, input().split())
 
if taka >= action:
  print(taka-action, aoki)
 
else:
  print(0, max(aoki-(action-taka, 0)))

Buggy submission (verdict: Runtime Error):
taka, aoki, action = int(input().split())

for i in range(action):
  if taka > 0:
    taka -= 1
    continue
  
  elif aoki > 0:
    aoki -= 1
    continue
  
  else:
    break

print(taka, aoki)
Problem p02818 (python)

Fixed submission:
a, b, k = map(int, input().split())
print(max(a - k, 0), max(b - max(k - a, 0), 0))

Buggy submission (verdict: Runtime Error):
a, b, k = input().split()
print(max(a - k, 0), b - max(k - a, 0))
Problem p02830 (python)

Fixed submission:
_ = input()
a, b = input().split()
 
result = ""
 
for a_, b_ in zip(a, b):
	result += a_ + b_
 
print(result)

Buggy submission (verdict: Runtime Error):
_ = input()
a, b = input().split()

result = ""

for a_, b_ in zip(a, b):
	result += a_ + b+

print(result)
Problem p03264 (python)

Fixed submission:
N = int(input())
a = int((N - N % 2) * (N + N % 2)/4)
print(a)

Buggy submission (verdict: Runtime Error):
N = int(intput())

print((N - N % 2) * (N + N % 2)/4)
Problem p03288 (python)

Fixed submission:
a = int(input())

if a < 1200:
    print("ABC")
elif a < 2800:
    print("ARC")
else:
    print("AGC")

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

if a < 1200:
    print("ABC")
elif a < 2800:
    print("ARC")
else
    print("AGC")
Problem p02817 (python)

Fixed submission:
S, T = raw_input().split()
print T+S

Buggy submission (verdict: Runtime Error):
S, T = input()
print(T+S)

Buggy submission (verdict: Runtime Error):
S, T = input()
print(T,S)
Problem p02818 (python)

Fixed submission:
input_line = input().split(' ')
taka = int(input_line[0])
aoki = int(input_line[1])
numK = int(input_line[2])
result = ""
if taka + aoki <= numK:
  result = "0 0"
elif taka >= numK:
  result = str(taka - numK) + " " + str(aoki)
elif taka + aoki > numK:
  result = "0 " + str(taka + aoki - numK)
  
print(result)

Buggy submission (verdict: Runtime Error):
input_line = input().split(' ')
taka = int(input_line[0])
aoki = int(input_line[1])
numK = int(input_line[2])

for i in range(k):
  if taka >= 1:
    taka -= 1
    continue
  elif aoki >= 1:
    aoki -= 1
    continue
  else:
    break

print(taka + ' ' + aoki)
Problem p02993 (python)

Fixed submission:
code = input()
ans = "Good"
if code[0] == code[1] or code[1] == code[2] or code[2] == code[3]:
    ans = "Bad"
print(ans)

Buggy submission (verdict: Runtime Error):
code = input()
ans = "Bad"
if code[0] == code[1] or code[1] == code[2] or code[2] == code[3] or code[3] == code[4]:
    ans = "Good"
print(ans)
Problem p02996 (python)

Fixed submission:
n = int(input())
task = []

for i in range(n):
    task.append([int(j) for j in input().split()])

task.sort(key = lambda x:x[1])

ans = "Yes"
cur = 0
remaining = 0
for i in task:
    remaining += i[1] - cur - i[0]
    if remaining < 0:
        ans = "No"
        break
    cur = i[1]

print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
task = [int(j) for j in input().split()]

for i in range(n):
    task.append([int(j) for j in input().split()])

task.sort(key = lambda x:x[1])
Problem p02818 (python)

Fixed submission:
# coding: utf-8
import numpy as np
from functools import lru_cache
import time

def main(): 
    if True:
        A,B,K = list(map(
            int, input().split()))
    else:
        pass

    A = A - K
    B = B if A > 0 else B + A 
    print(max(A,0),max(B,0))



if __name__ =='__main__':
    main()

Buggy submission (verdict: Runtime Error):
# coding: utf-8
import numpy as np
from functools import lru_cache
import time

def main(): 
    if True:
        A,B,K = list(map(
            int, input().split()))
    else:
        pass

    A = A - K
    B = B if A > 0 else B + A 
    print(min(A),B)



if __name__ =='__main__':
    main()
Problem p03024 (python)

Fixed submission:
import numpy as np
s=np.asarray(list(str(input())))
r=15-s.size
if(8 <= r + np.sum(s=="o")):
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
import numpy as np
s=np.asarray(list(str(input())))
r=15-s.size()
if(8 <= r + np.sum(s=="o")):
  print("YES")
else:
  print("NO")
Problem p03047 (python)

Fixed submission:
import numpy as np

n,k=list(map(int,input().split()))
print(n-k+1)

Buggy submission (verdict: Runtime Error):
import numpy as np
    
n = int(input())
S = np.asarray([])
St = np.zeros(4) # None,B,A,BA
count = 0

for i in range(n):
    S=np.append(S,input())
    tmp = 0
    count += S[i].count("AB")
    if S[i][0] == "B":
        tmp += 1
    if S[i][-1] == "A":
        tmp += 2
    St[tmp]+=1

if (St[1] == 0)&(St[3]>0):
    St[1]+=1
    St[3]-=1

if (St[2] == 0)&(St[3]>0):
    St[2]+=1
    St[3]-=1

print(int(count+min(St[1],St[2])+St[3]))

Buggy submission (verdict: Runtime Error):
    import numpy as np
        
    n = int(input())
    S = np.asarray([])
    St = np.zeros(4) # None,B,A,BA
    count = 0
     
    for i in range(n):
        S=np.append(S,input())
        tmp = 0
        count += S[i].count("AB")
        if S[i][0] == "B":
            tmp += 1
        if S[i][-1] == "A":
            tmp += 2
        St[tmp]+=1
     
    if (St[1] == 0)&(St[3]>0):
        St[1]+=1
        St[3]-=1
     
    if (St[2] == 0)&(St[3]>0):
        St[2]+=1
        St[3]-=1
     
    print(int(count+min(St[1],St[2])+St[3]))
Problem p03125 (python)

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

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
r = a + b if b % a == 0 else b - a
print(r)
Problem p02817 (python)

Fixed submission:
string = []

string = input().split()

print(string[1]+string[0])

Buggy submission (verdict: Runtime Error):
x = input()
y = input()

print(y+x)
Problem p02817 (python)

Fixed submission:
s,t = input().split()

print(t+s)

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

print(t+s)

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

print(t+s)
Problem p02824 (python)

Fixed submission:
from math import ceil
n, m, v, p = map(int, input().split())
a = sorted(list(map(int, input().split())), reverse=True)[p - 1:]
l = 0
r = n - p

while l != r:
    k = ceil((l + r) / 2)
    b = a[k] + m
    if b < a[0] or (v - (n - k)) * m > (k * b - sum(a[:k])):
        r = k - 1
    else:
        l = k
print(p+l)

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

a.sort()

b = [a[x] for x in range(n - p)]

total = sum(b)

vote=(v - p) * m

ans = p

for n, i in enumerate(b):
    if (total - i + vote) // (len(b) - 1) <= i + m:
        ans += len(b) - n - 1
        break

print(ans)

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

a.sort()

b = [a[x] for x in range(n - p)]

total = sum(b)

vote=(v - p) * m

ans = p

for i in b:
    if (total - i + vote) // (len(b) - 1) < i + m:
        ans += 1
        
print(ans)
Problem p02924 (python)

Fixed submission:
n=int(input());print(n*(n-1)//2)

Buggy submission (verdict: Runtime Error):
#include<stdio.h>
int main(void){long n;scanf("%ld",&n);printf("%ld\n",n*(n-1)/2);}
Problem p02952 (python)

Fixed submission:
ans = 0
for i in range(1, int(input())+1):
    if len(str(i))%2: ans+=1
print(ans)

Buggy submission (verdict: Runtime Error):
n = input()
ans = 0
for i in range(1, len(n)):
    if i%2: ans+=10**(i-1)*9
if len(n)%2: ans += int(n[1:])+1
print(ans)
Problem p03076 (python)

Fixed submission:
from math import ceil
def fanc(x):
    return int((ceil(x/10))*10)
ans = 0
menu = [int(input()) for _ in range(5)]
menu.sort(key=lambda x:x%10)
for i in range(5):
    if menu[i]%10:
        ans += menu.pop(i)
        break
menu = list(map(fanc, menu))
print(ans+sum(menu))

Buggy submission (verdict: Runtime Error):
from math import ceil
def fanc(x):
    return round((ceil(x/10))*10)
menu = [int(input()) for _ in range(5)]
menu.sort(key=lambda x:x%10)
for i in range(5):
    if menu[i]%10:
        ans = menu.pop(i)
        break
menu = list(map(fanc, menu))
print(ans+sum(menu))

Buggy submission (verdict: Runtime Error):
from math import ceil
def fanc(x):
    return int((ceil(x/10))*10)
menu = [int(input()) for _ in range(5)]
menu.sort(key=lambda x:x%10)
for i in range(5):
    if menu[i]%10:
        ans = menu.pop(i)
        break
menu = list(map(fanc, menu))
print(ans+sum(menu))
Problem p03085 (python)

Fixed submission:
b = input()
if b == 'A':
    print('T')
elif b == 'T':
    print('A')
elif b == 'G':
    print("C")
else :
    print("G")

Buggy submission (verdict: Runtime Error):
b = input()
if b == 'A':
    print('T')
elif b == 'T':
    print('A')
elif b == 'G':
    print("C")
else :
    print("T")

~                                                                                                    
~                                                                                                    
~                                                                                                    
~                                                                                                    
~
Problem p03106 (python)

Fixed submission:
a, b, k = map(int, input().split())
nums = []
for i in range(min(a, b)-1):
    if ((a % (i+1) == 0) and (b % (i+1) == 0)):
        nums.append(i+1)
if ( max(a,b) % min(a,b) == 0 ):
    nums.append(min(a,b))
print(nums[-1*k])

Buggy submission (verdict: Runtime Error):
a, b, k = map(int, input().split())
nums = []
for i in range(min(a, b)-2):
    if ((a % (i+2) == 0) and (b % (i+2) == 0)):
        nums.append(i+2)
if ( max(a,b) % min(a,b) == 0 ):
    nums.append(min(a,b))
print(nums[-1*k])
Problem p03125 (python)

Fixed submission:
n, m = map(int, input().split())
if m % n :
  print(m - n)
else :
  print(n + m)

Buggy submission (verdict: Runtime Error):
n, m = map(int, input(),split())
if m % n :
  print(m - n)
else :
  print(n + m)
Problem p03136 (python)

Fixed submission:
n = int(input())
nums = list(map(int, input().split()))
mx = nums.pop(nums.index(max(nums)))
if mx < sum(nums):
  print("Yes")
else :
  print("No")

Buggy submission (verdict: Runtime Error):
n = int(input())
nums = list(map(int, input().split()))
mx = nums.pop(max(nums))
if mx < sum(nums):
  print("Yes")
else :
  print("No")
Problem p03219 (python)

Fixed submission:
list = input().split()
X = list[0]
Y = list[1]

price = round(int(X) + (int(Y)/2))
print(price)

Buggy submission (verdict: Runtime Error):
list = input().split()
X = list[0]
Y = list[1]

price = X + Y/2
print(price)

Buggy submission (verdict: Runtime Error):
list = input().split
X = list[0]
Y = list[1]

price = X + Y/2
print(price)
Problem p03292 (python)

Fixed submission:
a = list(map(int, input().split()))
a.sort()
#print(a)
ans = (a[2]-a[1])+(a[1]-a[0])
print(ans)

Buggy submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
list = []
list.append( max(a,b)-min(a,b) )
list.append( max(b,c)-min(b,c) )
list.append( max(a,c)-min(a,c) )

mini = list.pop(min(list))
ans = mini + min(list)

print(ans)
Problem p03544 (python)

Fixed submission:
n = int(input())
L0, L1 = 2, 1
while True:
    if n == 1:
        print(L1)
        exit()
    L0 += L1
    n -= 1
    if n == 1:
        print(L0)
        exit()
    L1 += L0
    n -= 1

Buggy submission (verdict: Runtime Error):
input(); a = sorted(map(int, input().split()), reverse=True)
print(sum(a[0::2])-sum(a[1::2]))
Problem p03547 (python)

Fixed submission:
x, y = input().split();print("=" if x==y else "<>"[x>y::2])

Buggy submission (verdict: Runtime Error):
x, y = input().split();Sprint("=" if x==y else "<>"[x>y::2])
Problem p03633 (python)

Fixed submission:
from functools import reduce

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

def lcm(x, y):
    return x*y // gcd(x, y)

n = int(input())
nums = [int(input()) for _ in range(n)]
print(reduce(lcm, nums))

Buggy submission (verdict: Runtime Error):
from math import gcd
from functools import reduce

def lcm(x, y):
    return x*y // gcd(x, y)

n = int(input())
nums = [int(input()) for _ in range(n)]
print(reduce(lcm, nums))
Problem p03657 (python)

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

if a%3 == 0 or b%3 == 0 or (a+b)%3 == 0:
  print("Possible")
else :
  print("Impossible")

Buggy submission (verdict: Runtime Error):
if a/3 == 0 or b/3 == 0 or (a+b)/3 == 0:
  print("Possible")
else :
  print("Inpossible")
Problem p03658 (python)

Fixed submission:
n, k = map(int, input().split())
ans = 0

nums = list(map(int, input().split()))

nums.sort(reverse=True)

for i in range(k):
  ans += nums.pop(0)
  
print(ans)

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

nums = list(map(int, input().split()))

nums.sort(reverse="True")

for i in range(k):
  ans += nums.pop(0)
  
print(ans)

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

nums = list(map(int, input().split()))

nums.sort

for i in range(k):
  ans += pop.nums(0)
  
print(ans)
Problem p03695 (python)

Fixed submission:
n = int(input());l = [0]*9
for i in map(int, input().split()):l[min(8,i//400)]+=1
mn = len(list(filter(lambda x:x>0, l[:8])))
print(max(1, mn), mn+l[8])

Buggy submission (verdict: Runtime Error):
n = int(input());l = [0]*9
for i in map(int, input().split()):l[i//400]+=1
mn = len(list(filter(lambda x:x>0, l[:8])))
print(mn, min(8, mn+l[8]))
Problem p03844 (python)

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

Buggy submission (verdict: Runtime Error):
a, b, c = input().split()
if b == '+':
  print(a+c)
else:
  print(a-c)
Problem p03846 (python)

Fixed submission:
n=int(input())
a=sorted(map(int, input().split()))
if n%2: b = [i if not(i%2) else i+1 for i in range(n)]
else: b = [i if i%2 else i+1 for i in range(n)]
if a==b:print((2**(n//2))%(10**9+7))
else: print(0)

Buggy submission (verdict: Runtime Error):
def main(): 
  MOD = 10e9+7
  n = int(input())
  a = sorted(map(int, input().split()))
  ans = 2**(n//2)
  if n%2:
    if a.pop(0)!=0:ans=0
  i = n%2 - 1
  for j in range(n//2):
    i += 2
    if a[j*2]!=i or a[j*2+1]!=i: ans=0
  print(int(ans%MOD))

if __name__=="__main__":main()

Buggy submission (verdict: Runtime Error):
def main(): 
  MOD = 10e9+7
  n = int(input())
  a = sorted(map(int, input().split()))
  ans = 2**(n//2)%MOD
  if n%2:
    if a.pop(0)!=0:ans=0
  i = n%2 - 1
  for j in range(n//2):
    i += 2
    if a[j*2]!=i or a[j*2+1]!=i: ans=0
  print(int(ans))

if __name__=="__main__":main()
Problem p04030 (python)

Fixed submission:
s = list(input())
ans = []
for i in range(len(s)):
    if s[i] == '0' or s[i] == '1':
        ans.append(s[i])
    else:
        if len(ans) > 0:
            ans.pop(-1)
print("".join(ans))

Buggy submission (verdict: Runtime Error):
s = list(input())
ans = []
for i in range(len(s)):
    if s[i] == '0' or s[i] == '1':
        ans.append(s[i])
    else:
        if len(ans) > 0:
            ans.pop(i-1)
print("".join(ans))
Problem p02818 (python)

Fixed submission:
def getdata_input():
    while True:
        yield input()
def callFunc2(it):
    A0,B0,K=map(int, next(it).split())
    A=[0]
    B=[0]
    
    t=min(K,A0)
    A.append(t)
    t=min(K-t,B0)
    B.append(min(t,B0))
    return(" ".join([str(A0-sum(A)), str(B0-sum(B))]))
  
it=getdata_input()
print(callFunc2(it))

Buggy submission (verdict: Runtime Error):
def getdata_input():
    while True:
        yield input()

def callFunc2(it):
    A0,B0,K=map(int, next(it).split())
    A=[0]
    B=[0]
    n=K//2

    A.append(min(n,A0))
    B.append(min(n,B0))

    n=K-(sum(A)+sum(B))
    
    if n>0:
        t=A0-sum(A)
        A.append(min(n, t))
        n=n-t
    if n > 0:
        t=B0-sum(B)
        B.append(min(n,t))
    return(f'{A0-sum(A)} {B0-sum(B)}')
  
it=getdata_input()
print(callFunc2(it))
Problem p02830 (python)

Fixed submission:
def s_gen():
    for x in S: 
        yield x
def t_gen():
    for x in T:
        yield x
        

N=int(input())
S,T=input().split()
S,T=S[:N],T[:N]

it=s_gen()
it2=t_gen()

print("".join([next(it)+next(it2) for _ in range(N)]))

Buggy submission (verdict: Runtime Error):
def s_gen():
    for x in S: 
        yield x
def t_gen():
    for x in T:
        yield x
        

N=int(input())
S=input()[:N]
T=input()[:N]
it=s_gen()
it2=t_gen()

print("".join([next(it)+next(it2) for _ in range(N)]))
Problem p03210 (python)

Fixed submission:
x = input()
 
if x in "753":
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
x = input()
 
if x in "753":
  print("Yes")
else:
  print("No"
Problem p03493 (python)

Fixed submission:
s = input()

print(s.count("1"))

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

print(s.count(1))
Problem p03573 (python)

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

if a == b:
  print(c)
elif b == c:
  print(a)
elif a == c:
  print(b)

Buggy submission (verdict: Runtime Error):
a, b, c = int(input().split())

if a == b:
  print(c)
elif b == c:
  print(a)
elif a == c:
  print(b)
Problem p03773 (python)

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

print((a + b) % 24)

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())

print(24 % a + b)
Problem p02995 (python)

Fixed submission:
a,b,c,d=map(int,input().split())
bc=int(b//c)
if a%c==0:
    ac=int(a//c)-1
else:
    ac=int(a//c)
bd=b//d
if a%d==0:
    ad=int(a//d)-1
else:
    ad=int(a//d)
e=c
f=d
while f:
    e, f = f, int(e % f)
gcd=int(e)
l=int(c*d/gcd)
bl=int(b//l)
if a%l==0:
    al=int(a//l)-1
else:
    al=int(a//l)
s=int(b-a+1)
s2=int(bc-ac+bd-ad-bl+al)
print(s-s2)

Buggy submission (verdict: Runtime Error):
import math
a,b,c,d=map(int,input().split())
s=b-a
bc=b//c
if a%c==0:
    ac=a//c-1
else:
    ac=a//c
bd=b//d
if a%d==0:
    ad=a//d-1
else:
    ad=a//d
gcd=math.gcd(c,d)
l=c*d/gcd
bl=b//l
if a%l==0:
    al=a//l-1
else:
    al=a//l
print(int(b-a+1-(bc-ac+bd-ad-bl+al)))
Problem p03044 (python)

Fixed submission:
import sys
sys.setrecursionlimit(10**7)
n=int(input())
a=[[] for i in range(n)]
for i in range(n-1):
    u,v,w=map(int,input().split())
    a[u-1].append((v-1,w))
    a[v-1].append((u-1,w))
b=[None for i in range(n)]
def k(v,dis):
    b[v]=dis
    for next_v,w in a[v]:
        if b[next_v]!=None:
            continue
        if w%2==0:
            k(next_v,dis)
        else:
            k(next_v,1-dis)
k(0,0)
for i in range(n):
    print(b[i])

Buggy submission (verdict: Runtime Error):
n=int(input())
a=[[] for i in range(n)]
for i in range(n-1):
    u,v,w=map(int,input().split())
    a[u-1].append((v-1,w))
    a[v-1].append((u-1,w))
b=[None for i in range(n)]
def k(v,dis):
    b[v]=dis
    for next_v,w in a[v]:
        if b[next_v]!=None:
            continue
        if w%2==0:
            k(next_v,dis)
        else:
            k(next_v,1-dis)
k(0,0)
for i in range(n):
    print(b[i])

Buggy submission (verdict: Runtime Error):
n=int(input())
a=[[] for i in range(n)]
for i in range(n-1):
    u,v,w=map(int,input().split())
    a[u-1].append((v-1,w%2))
    a[v-1].append((u-1,w%2))
b=[None for i in range(n)]
def k(v,dis):
    b[v]=dis
    for next_v,w in a[v]:
        if b[next_v]!=None:
            continue
        if w%2==0:
            k(next_v,dis)
        else:
            k(next_v,1-dis)
k(0,0)
for i in range(n):
    print(b[i])
Problem p02817 (python)

Fixed submission:
S,T=input().split(' ')
print(T+S)

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

if A==0 and B==0:
  pass
elif A>0:
  if A>=K:
  	A = A-K
  elif A+B>K:
    B = B-K+A
    A = 0
  else:
    A=0
    B=0
elif B>K:
  B=B-K
else:
  B=0
print('%d %d' % (A,B))

Buggy submission (verdict: Runtime Error):
S, T = imput().split(" ")
print(T+S)
Problem p02885 (python)

Fixed submission:
a, b = map(int, input().split())
print(max(a - 2*b, 0))

Buggy submission (verdict: Runtime Error):
print(max(int(input()) - 2*int(input()), 0))
Problem p03059 (python)

Fixed submission:
import math
import re

a,b,t = raw_input().split()
#s = list(raw_input())

a = int(a)
b = int(b)
t = int(t)

now = a
total = 0
while True:
    if now < t + 0.5:
        total += b
        now += a
    else:
        break

print total

Buggy submission (verdict: Runtime Error):
import math

n = int(raw_input())
a = raw_input().split()

cnt = 0
for i in a:
    a[cnt] = int(i)
    cnt += 1

chk = {}
def make_divisors(k):
    divisors = []
    for i in range(1, int(k**0.5)+1):
        if k % i == 0:
            #divisors.append(i)
            if i in chk:
                chk[i] += 1
            else:
                chk[i] = 1
            if i != k // i:
                #divisors.append(n//i)
                key = int(k//i)
                if key in chk:
                    chk[key] += 1
                else:
                    chk[key] = 1

    # divisors.sort()
    return divisors

if n == 2:
    print max(a[0],a[1])
else:
    for i in range(2):
        make_divisors(a[i])
    for i in reversed(range(2,len(a))):
        k = a[i]
        chk2 = chk
        for j in chk:
            if k % j == 0:
                chk[j] += 1
            if chk[j] < i:
                #del chk2[j]
                continue
        chk = chk2
    answer = 0
    for i in chk:
        if int(chk[i]) >= n - 1:
            answer = i
    print answer