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

Fixed submission:
N = int(input())
inputs = [int(input()) for i in range(N)]

points = [int(s) for s in inputs]
points_sorted = sorted(points)

get_point = sum(points_sorted)
non_10 = [x for x in points_sorted if (x % 10 != 0)]

if get_point % 10 != 0:
    print(get_point)
elif non_10 == []:
    print(0)
else:
    print(get_point - min(non_10))

Buggy submission (verdict: Runtime Error):
N = int(input())
inputs = [int(input()) for i in range(N)]

points = [int(s) for s in inputs]
points_sorted = sorted(points)

get_point = sum(points)

idx = 0
if get_point % 10 != 0:
    print(get_point)
else:
    while points_sorted[idx] % 10 == 0:
        idx += 1
        if idx == N - 1:
            print(0)
    print(get_point - points_sorted[idx])

Buggy submission (verdict: Runtime Error):
N = int(input())
inputs = [int(input()) for i in range(N)]

points = [int(s) for s in inputs]
points_sorted = sorted(points)

get_point = sum(points)

idx = 0
if get_point % 10 != 0:
    print(get_point)
else:
    while points_sorted[idx] % 10 == 0:
        idx += 1
        if idx == N:
            print(0)
    print(get_point - points_sorted[idx])

Buggy submission (verdict: Runtime Error):
N = int(input())
inputs = [int(input()) for i in range(N)]

points = [int(s) for s in inputs]
points_sorted = sorted(points)

get_point = sum(points)
if get_point % 10 != 0:
    print(get_point)
else:
    cand1 = get_point - points_sorted[0]
    cand2 = get_point - points_sorted[1]
    if (cand1 > cand2) and (cand1 % 10 != 0):
        print(cand1)
    elif (cand2 % 10 != 0):
        print(cand2)
    else:
        print(0)

Buggy submission (verdict: Runtime Error):
inputs = list(input().split())

n = inputs[0]
points = [int(s) for s in inputs[1:]]

get_point = sum(points)

while get_point % 10 == 0:
    get_point -= min(points)
    if get_point <= 0:
        break

print(get_point)
Problem p03423 (python)

Fixed submission:
N=int(input())
NCount = 0
while N >=0:
    NCount+= 1
    N -=3
print(NCount-1)

Buggy submission (verdict: Runtime Error):
N=int(input())
NCount = 0
while N =>0:
    NCount+= 1
    N -=3
print(NCount-1)
Problem p03424 (python)

Fixed submission:
a=int(input())
b=input()
if 'Y' in b:
    print("Four")
else:
    print("Three")

Buggy submission (verdict: Runtime Error):
N=int(input())
NCount = 0
while N =>0:
    NCount+= 1
    N -=3
print(NCount-1)
Problem p03407 (python)

Fixed submission:
lista=input().split()
a=int(lista[0])
b=int(lista[1])
c=int(lista[2])
if a+b>=c:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
lista=input().split
a=int(lista[0])
b=int(lista[1])
c=int(lista[2])
if a+b>=c:
  print('Yes')
else:
  print('No')
Problem p03408 (python)

Fixed submission:
n = int(input())
d = {}
for i in range(n):
    a=input()
    if a in d:
        d[a]+=1
    else:
        d[a]=1
m = int(input())
for i in range(m):
    a=input()
    if a in d:
        d[a]-=1
    else:
        d[a]=-1
m=max(d.values())
if m<0:
    m=0
print(m)

Buggy submission (verdict: Runtime Error):
n = int(input())
d = {}
for i in range(n):
    a=input()
    if a in d:
        d[a]+=1
    else:
        d[a]=1
m = int(input())
for i in range(n):
    a=input()
    if a in d:
        d[a]-=1
    else:
        d[a]=-1
print(max(d.values()))
Problem p03455 (python)

Fixed submission:
x = input().split()
#x = [3,4]
#x[0] = 3, x[1] = 4

a = int(x[0])
b = int(x[1])
c = a * b
d = c % 2
if d == 0 :
    print('Even')
else :
    print('Odd')

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = a * b
d = c % 2
if d == 0 :
    print('Even')
else :
    print('Odd')
Problem p03417 (python)

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

if N==1 and M==1:
    print(1)
elif N==1 or M==1:
    print(max(N,M)-2)
else:
    print((N-2)*(M-2))

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

A=np.zeros((N,M))
def re(x,y):
    global A
    try:
        if x>=0 and y>=0:
            if A[x][y]==0:
                A[x][y]=1
            else:
                A[x][y]=0
    except:
        pass
    return A


for i in range(N):
    for j in range(M):
        for X in range(-1,2):
            for Y in range(-1,2):
                re(i+X,j+Y)

print(np.count_nonzero(A))
Problem p03424 (python)

Fixed submission:
n = int(input())
s = input().split()

res = 'Three'
if 'Y' in s:
  res = 'Four'

print(res)

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

res = 'Three'
if 'Y' in s:
  res = 'Four'

print(res)
Problem p03416 (python)

Fixed submission:
A,B = input().split(' ')
num = 0
for i in range(int(A), int(B)+1):
    s = str(i)
    for j in range(len(s)//2):
        if s[j] != s[len(s)-1-j]:
            break
        if j == len(s)//2 - 1:
            num += 1
print(num)

Buggy submission (verdict: Runtime Error):

A,B = input().split(' ')
num = 0
for i in range(int(A), int(B)+1):
    s = str(i)
    for j in range(len(s)//2):
        if s[j] != s[len(s)-1-j]:
            break
        if j == len(s)//2 - 1:
            num += 1
print(num
Problem p03436 (python)

Fixed submission:
import sys
import math

H, W = map(int, input().split(' '))
S = [input() for i in range(H)]
M = [[10000]*W for i in range(H)]
M[0][0] = 0
for k in range(H*W):
    for i in range(H):
        for j in range(W):
            if M[i][j] == k:
                if i > 0 and M[i-1][j] > k+1 and S[i-1][j] == '.':
                    M[i-1][j] = k+1
                if i < H-1 and M[i+1][j] > k+1 and S[i+1][j] == '.':
                    M[i+1][j] = k+1
                if j > 0 and M[i][j-1] > k+1 and S[i][j-1] == '.':
                    M[i][j-1] = k+1
                if j < W-1 and M[i][j+1] > k+1 and S[i][j+1] == '.':
                    M[i][j+1] = k+1
if M[-1][-1] == 10000:
    print(-1)
    sys.exit()
minDis = M[-1][-1] + 1
numWhite = 0
for line in S:
    numWhite += line.count('.')
print(numWhite-minDis)

Buggy submission (verdict: Runtime Error):
H, W = map(int, input().split(' '))
S = [input() for i in range(H)]
M = [[10000]*W for i in range(H)]
M[0][0] = 0
for k in range(H*W):
    for i in range(H):
        for j in range(W):
            if M[i][j] == k:
                if i > 0 and M[i-1][j] > k+1 and S[i-1][j] == '.':
                    M[i-1][j] = k+1
                if i < H-1 and M[i+1][j] > k+1 and S[i+1][j] == '.':
                    M[i+1][j] = k+1
                if j > 0 and M[i][j-1] > k+1 and S[i][j-1] == '.':
                    M[i][j-1] = k+1
                if j < W-1 and M[i][j+1] > k+1 and S[i][j+1] == '.':
                    M[i][j+1] = k+1
if M[-1][-1] == 10000:
    print(-1)
    sys.exit()
minDis = M[-1][-1] + 1
numWhite = 0
for line in S:
    numWhite += line.count('.')
print(numWhite-minDis)
Problem p03612 (python)

Fixed submission:
N = int(input())
P = list(map(int, input().split(' ')))
num = 0
for i in range(len(P)):
    if P[i] == i+1:
        if i+1 == len(P):
            P[i],P[i-1] = P[i-1],P[i]
        else:
            P[i],P[i+1] = P[i+1],P[i]
        num += 1
print(num)

Buggy submission (verdict: Runtime Error):
N = int(input())
P = list(map(int, input().split(' ')))
num = 0
for i in range(len(P)):
    if P[i] == i+1:
        P[i],P[i+1] = P[i+1],P[i]
        num += 1
print(num)
Problem p03682 (python)

Fixed submission:

import sys
sys.setrecursionlimit(int(2e9))

def distance(P, p1, p2):
    return min(abs(P[p1][1]-P[p2][1]), abs(P[p1][2]-P[p2][2]))
def root(CI, p):
    if CI[p] == p:
        return p
    else:
        CI[p] = root(CI, CI[p])
        return CI[p] 

N = int(input())
P = [[j]+[int(i) for i in input().split(' ')] for j in range(N)]
sortX = sorted(P,key=lambda x:x[1])
sortY = sorted(P,key=lambda x:x[2])
EX = [[sortX[i][0], sortX[i+1][0], distance(P,sortX[i][0],sortX[i+1][0])] for i in range(N-1)]
EY = [[sortY[i][0], sortY[i+1][0], distance(P,sortY[i][0],sortY[i+1][0])] for i in range(N-1)]
E = EX + EY
E = sorted(E, key=lambda x:x[2])
CI = [i for i in range(N)]
disSum = 0
for e in E:
    s,l = min(e[0],e[1]),max(e[0],e[1])
#     if CI[s] != CI[l]:
#         CI = list(map(lambda x:CI[s] if x == CI[l] else x, CI))
#         disSum += e[2]
    if root(CI, s) != root(CI, l):
        CI[root(CI, l)] = root(CI, s)
        disSum += e[2]
print(disSum)

Buggy submission (verdict: Runtime Error):

def distance(P, p1, p2):
    return min(abs(P[p1][1]-P[p2][1]), abs(P[p1][2]-P[p2][2]))
def root(CI, p):
    if CI[p] == p:
        return p
    else:
        CI[p] = root(CI, CI[p])
        return CI[p] 

N = int(input())
P = [[j]+[int(i) for i in input().split(' ')] for j in range(N)]
sortX = sorted(P,key=lambda x:x[1])
sortY = sorted(P,key=lambda x:x[2])
EX = [[sortX[i][0], sortX[i+1][0], distance(P,sortX[i][0],sortX[i+1][0])] for i in range(N-1)]
EY = [[sortY[i][0], sortY[i+1][0], distance(P,sortY[i][0],sortY[i+1][0])] for i in range(N-1)]
E = EX + EY
E = sorted(E, key=lambda x:x[2])
CI = [i for i in range(N)]
disSum = 0
for e in E:
    s,l = min(e[0],e[1]),max(e[0],e[1])
#     if CI[s] != CI[l]:
#         CI = list(map(lambda x:CI[s] if x == CI[l] else x, CI))
#         disSum += e[2]
    if root(CI, s) != root(CI, l):
        CI[root(CI, l)] = root(CI, s)
        disSum += e[2]
print(disSum)
Problem p03687 (python)

Fixed submission:

def convertList(strList, c):
    time = 0
    tmpList = list(strList)
    while tmpList.count(c) != len(tmpList):
        newList = []
        for i in range(len(tmpList[:])-1):
            newList.append(c if (tmpList[i] == c or tmpList[i+1] == c) else tmpList[i])
        tmpList = list(newList)
        time += 1
    return time

S = input()
strList = list(S)
strSet = set(strList)
minTime = 1000000 
for c in strSet:
    time = convertList(strList, c)
    if minTime > time:
        minTime = time
print(minTime)

Buggy submission (verdict: Runtime Error):

import sys

def judgeUpper(ansList, var):
    for a in ansList:
        if int(a) > var:
#             print(a + ':' + str(var) + str(True))
            return True
    return False
def judgeEqual(ansList, var, N):
    count = ansList.count(str(var))
#     print(str(count) + ':' + str(N-1) + str(count < N - 1))
    return count < N - 1 or (count == N and var * 2 > N and var+1 != N)
def judgeLower(ansList, var):
    for a in ansList:
        if int(a) < var - 1:
#             print(a + ':' + str(var-1) + str(True))
            return True
    return False
        
N = input()
ansList = input().split(' ')
for i in range(int(N)):
    var = i + 1
    if judgeUpper(ansList, var):
        continue
    if judgeEqual(ansList, var, int(N)):
        continue
    if judgeLower(ansList, var):
        continue
    print('Yes')
    sys.exit()
print('No')
Problem p03563 (python)

Fixed submission:
old = int(input())
new = int(input())
print(2*new-old)

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

T = sum(t)

def f(l, r, v, x):
	maxv = 0
	if 0 <= x and x < l:
		maxv = v + l - x
	elif l <= x and x <= r:
		maxv = v
	else:
		maxv = v + x - r
	return maxv

def vel(x):
	minv = f(0, 0, 0, x)
	minv = min(minv, f(T, T, 0, x))
	l = 0
	r = 0
	for i in range(len(t)):
		r += t[i]
		minv = min(minv, f(l, r, v[i], x))
		l += t[i]
	return minv

area = 0
for i in range(T):
	area += 0.25 * (vel(i) + 2 * vel(i+0.5) + vel(i+1))

print(area)
Problem p03437 (python)

Fixed submission:
x, y = list(map(int, input().split()))


def gcd(a, b): return a if b == 0 else gcd(b, a % b)


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


a = lcm(x, y) - x

print(-1 if a == 0 else a)

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

from math import gcd

x, y = list(map(int, input().split()))


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

    return reduce(lcm, numbers, 1)


a = lcm(x, y) - x

print(-1 if a == 0 else a)
Problem p03417 (python)

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

print(abs((N - 2) * (M - 2)))

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

if N == 1 and M == 1:
    print(1)

else if N == 1:
    print(M - 2)

else if M == 1:
    print(N - 2)

else:
    print((M - 2)*(N -2))
Problem p03415 (python)

Fixed submission:
a = input()
b = input()
c = input()
print(a[0] + b[1] + c[2])

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

print(a[0] + b[1] + c[2])

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

print(str(a[0]) + str(b[1]) + str(c[2]))

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

print(str(a[0] + str(b[1]) + str(c[2]))
Problem p03433 (python)

Fixed submission:
n = int(input())
a = int(input())
n%=500

if n<=a:
  print('Yes')
else:
  print('No')

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

N %= 500

if N <= a:
  print('Yes')
else:
  print('No')
Problem p03447 (python)

Fixed submission:
import sys

def main():
  input = sys.stdin.readline
  X = int(input())
  A = int(input())
  B = int(input())
  
  print((X-A)%B)
  
if __name__ == '__main__':
  main()

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

def cake(X, A, B):
  X -= A
  a = X//B
  X -= a*B
  return X

print(cake(X, A, B))

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

def cake(X, A, B):
  X -= A
  a = X//B
  X -= a*B
  return X

print(cake(X))
Problem p03448 (python)

Fixed submission:
a = int(input())
b = int(input())
c = int(input())
x = int(input())
ans = 0

for i in range(a+1):
  for j in range(b+1):
    for k in range(c+1):
      if 500*i + 100*j + 50*k == x:
        ans += 1

print(ans)

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
x = int(input())
ans = 0

for i in range(a+1):
  for j in range(b+1):
    for k in range(c+1):
      if 500*i + 100*j + 50*k == X:
        ans += 1

print(ans)

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())
C = int(input())
X = int(input())
res = 0
if 50=>A=>0 and 50=>B=>0 and 50=>C=>0 and (A+B+C)=>1 and 50=<X=<20000 and X%50==0:
  for i in range(A+1):
    for j in range(B+1):
      for k in range(C+1):
        if 500*i + 100*j + 50*k == X:
          res += 1
print(res)
Problem p03455 (python)

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

if a*b % 2 == 0:
  print('Even')
else:
  print('Odd')

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

if (a*b) % 2 == 0:
  print('Even')
else:
  print('Odd')

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

if a*b % 2 == 0:
  print('Even')
else:
  print('Odd')
Problem p03494 (python)

Fixed submission:
N = input()
A = list(map(int, input().split()))
cnt = 0
while all(a%2==0 for a in A):
  A = [a/2 for a in A]
  cnt += 1
print(cnt)

Buggy submission (verdict: Runtime Error):
import math
n = input()
a = list(map(int, iput().split()))
ans = float('inf')
for i in a:
  ans = min(ans, len(bin(i)) - bin(i).rfind('1') - 1)
print(round(ans))
Problem p03415 (python)

Fixed submission:
# -*- coding: utf-8 -*-

print(input()[0] + input()[1] + input()[2])

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

a, b = map(int, input().split())
print([str(x // 1000) == str(x % 100)[::-1] for x in range(a, b+1)].count(True))

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

a, b = map(int, input().split())
n = 0

for i in range(a, b+1):
    if i // 10000 == i % 10 and (i // 1000) % 10 == (i % 100) // 10:
        n += 1

print(n)
Problem p03415 (python)

Fixed submission:
a=input()
b=input()
c=input()
print(a[0]+b[1]+c[2])

Buggy submission (verdict: Runtime Error):
A, B = map(int, input().split())
cnt=0
for i in range(A, B+1) :
    str_i=str(i)
    rev_i=str_i[::-1]
    t=len(str_i)//2
    if len(str_i)%2==1 and str_i[:t+1] == rev_i[:t+1] :
        cnt=cnt+1
print(cnt)
Problem p03415 (python)

Fixed submission:
x = input()
y = input()
z = input()
print(x[0]+y[1]+z[2])

Buggy submission (verdict: Runtime Error):
x = input().split(" ")
n = int(x[0])
k = int(x[1])
count = 0

for b in range(1, n+1):
    p = n/b
    r = n % b
    count += p*max(0, b-k)
    count += max(0, r-k+1)
    
print(count)

Buggy submission (verdict: Runtime Error):
x = raw_input()
y = raw_input()
z = raw_input()
print(x[0]+y[1]+z[2])

Buggy submission (verdict: Runtime Error):
x = raw_input()
print(x[0][0]+x[1][1]+x[2][2])

Buggy submission (verdict: Runtime Error):
x = input()
print(x[0][0]+x[1][1]+x[2][2])
Problem p03416 (python)

Fixed submission:
x = input().split(" ")
count = 0
for i in range(int(x[0]), int(x[1])+1):
    if(str(i) == str(i)[::-1]):
        count += 1

print(count)

Buggy submission (verdict: Runtime Error):
x = input()
y = input()
count = 0
for i in range(int(x), int(y)):
    if(str(i) == str(i)[::-1]):
        count += 1

print(count)

Buggy submission (verdict: Runtime Error):
x = input()
y = input()
count = 0
for i in range(int(x), int(y)):
    if(str(i) == str(i[::-1])):
        count += 1

print(count)
Problem p03417 (python)

Fixed submission:
list = input().split(" ")
x = [int(y) for y in list]
if x[0] == 1 and x[1] == 1:
    count =1
elif x[0] == 1 or x[1] == 1:
    count = max(x[0], x[1])-2
else:
    count = (x[0]-2)*(x[1]-2)
print(count)

Buggy submission (verdict: Runtime Error):
x = int(input().split(" "))
if x[0] == 1 and x[1] == 1:
    count =1
elif x[0] == 1 or x[1] == 1:
    count = max(x[0], x[1])-2
else:
    count = (x[0]-2)*(x[1]-2)
print(count)
Problem p03415 (python)

Fixed submission:
a = []
for i in range(3):
   	a.append(input())
o = a[0][0] + a[1][1] + a[2][2]
print(o)

Buggy submission (verdict: Runtime Error):
a = []
for i in range(3):
   	a.append(input())
o = a[0,0] + a[1,1] + a[2,2]
print(o)

Buggy submission (verdict: Runtime Error):
a = []
for i in range(3):
  	a.append(Input())
o = a[0,0] + a[1,1] + a[2,2]
print(o)

Buggy submission (verdict: Runtime Error):
a = []
for i in range(3)
	a.append(Input())
o = a[0,0] + a[1,1] + a[2,2]
print(o)
Problem p03415 (python)

Fixed submission:
ans = ""
for i in range(3):
 s = raw_input()
 ans += s[i]
print ans

Buggy submission (verdict: Runtime Error):
ans = ""
for i in range(3):
 s = raw_input().split(" ")
 ans += s[i]
print ans
Problem p03416 (python)

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

count = 0

for i in range(a, b + 1):
    work_i = i
    n = 1
    while work_i >= 10:
        n += 1
        work_i = int(work_i / 10)

    flag = True
    for j in range(int(n/2)):
        if int(i / 10**j) % 10 != int(i / 10**(n-j-1)) % 10:
            flag = False

    if flag:
        count += 1

print(count)

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

count = 0

for i in range(a, b + 1):
    work_i = i
    n = 1
    while work_i >= 10:
        n++ 
        work_i = int(work_i / 10)

    flag = True
    for j in range(int(n/2)):
        if int(i / 10**j) % 10 != int(i / 10**(n-j-1)) % 10:
            flag = False

    if flag:
        count++
Problem p03415 (python)

Fixed submission:
c = [input(), input(), input()]
print(c[0][0] + c[1][1] + c[2][2])

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

if N > 1 and M > 1:
    front = (N-1)*2 + (M-1)*2
    print(cards - front)
elif N == 1 and M == 1:
    print(1)
else:
    print(max(N, M) - 2)
Problem p03415 (python)

Fixed submission:
# -*- coding: utf-8 -*-

c = []
for i in range(3):
    c.append(list(input()))

for i in range(3):
    print(c[i][i], end='')

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

c = []
for i in range(3):
    c.append(input().split())

for i in range(3):
    print(c[i][i], end='')
Problem p03469 (python)

Fixed submission:
# -*- coding: utf-8 -*-

year, mon, day = input().split('/')
if year != 2018:
    year = 2018
print('{0}/{1}/{2}'.format(year,mon,day))

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
n,y = map(int,input().split())
for i in xrange(n+1):
    for j in xrange(n-i+1):
        k = n-i-j
        if y == 10000*i + 5000*j + 1000*(k):
            print('{0} {1} {2}'.format(i,j,k))
            exit()
print('-1 -1 -1')

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
n,y = map(int,input().split())
for i in range(n+1):
    for j in range(n-i+1):
        k = n-i-j
        if y == 10000*i + 5000*j + 1000*(k):
            print('{0} {1} {2}'.format(i,j,k))
            exit()
print('-1 -1 -1')
Problem p03415 (python)

Fixed submission:

def main():
    a1 = input()[0]
    a2 = input()[1]
    a3 = input()[2]

    print (a1+a2+a3)


if __name__ == "__main__":
    # global stime
    # stime = time.clock()
    main()

Buggy submission (verdict: Runtime Error):
def main():
    a1 = input().split()[0]
    a2 = input().split()[1]
    a3 = input().split()[2]

    print (a1+a2+a3)


if __name__ == "__main__":
    # global stime
    # stime = time.clock()
    main()
Problem p03448 (python)

Fixed submission:
def main():
	a, b, c, x = (int(input()), int(input()), int(input()), int(input()))

	count = 0
	for i in range(a+1):
		y = x- 500*i
		if y == 0:
			count += 1
			continue
		if y > 0:
			for j in range(b+1):
				z = y - j*100
				if z == 0:
					count += 1
					continue
				if z > 0:
					for k in range(c+1):
						if int(z-50*k) == 0:
							count += 1
							break

	print (count)

if __name__ == "__main__":
    # global stime
    # stime = time.clock()
    main()

Buggy submission (verdict: Runtime Error):
import itertools
import pandas as pd
import math 
from collections import defaultdict as dd
import numpy as np
import pandas as pd
def main():
	a = int(input())
	b = int(input())
	c = int(input())
	x = int(input())

	count = 0
	for i in range(a+1):
		y = x- 500*i
		if y == 0:
			count += 1
			continue
		if y > 0:
			for j in range(b+1):
				z = y - j*100
				if z == 0:
					count += 1
					continue
				if z > 0:
					for k in range(c+1):
						if int(z-50*k) == 0:
							count += 1
							break

	print (count)

if __name__ == "__main__":
    # global stime
    # stime = time.clock()
    main()

Buggy submission (verdict: Runtime Error):
from test import set_stdin_sandbox
set_stdin_sandbox("at87")

from pydoc import help# {{{
import re
from scipy import integrate
from operator import itemgetter
from collections import Counter
from collections import deque
import fractions
from heapq import heappop, heappush, heapify
import sys
import array
from copy import deepcopy as dcopy
from scipy.special import factorial
import sympy
import time
# }}}

from bisect import bisect_left, bisect_right, insort_left, insort_right

import numpy as np

import itertools
import pandas as pd
import math 
from collections import defaultdict as dd
import numpy as np
import pandas as pd
def main():
	a = int(input())
	b = int(input())
	c = int(input())
	x = int(input())

	count = 0
	for i in range(a+1):
		y = x- 500*i
		if y == 0:
			count += 1
			continue
		if y > 0:
			for j in range(b+1):
				z = y - j*100
				if z == 0:
					count += 1
					continue
				if z > 0:
					for k in range(c+1):
						if int(z-50*k) == 0:
							count += 1
							break

	print (count)

if __name__ == "__main__":
    # global stime
    # stime = time.clock()
    main()
Problem p03469 (python)

Fixed submission:
s  = input()
print ('2018'+s[4:])

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

import itertools

import math 
from collections import defaultdict as dd
def main():
    N, Y = map(int, input().split())
    a = int(Y/10000)

    if a*10000 == Y:
        print (a,0,0)
        return

    s = -1
    for k in range(a+1):
        b = N-k
        if b >= 0:
            for j in range(b+1):
                s = 10000*k+5000*j+1000*(b-j)
                if s == Y:
                    print (k,j,(b-j))
                    return

    if s != Y:
        print ('-1 -1 -1')



if __name__ == "__main__":
    # global stime
    # stime = time.clock()
    main()
Problem p03962 (python)

Fixed submission:
print(len(set([x for x in input().split()])))

Buggy submission (verdict: Runtime Error):
print(len(set(input.split())))